|
Cataclysm DDA
|
#include <game.h>
Classes | |
| class | Creature_range |
| class | debug_hour_timer |
| class | draw_callback_t |
| class | monster_range |
| class | non_dead_range |
| class | npc_range |
Public Types | |
| enum | inventory_item_menu_position { RIGHT_TERMINAL_EDGE , LEFT_OF_INFO , RIGHT_OF_INFO , LEFT_TERMINAL_EDGE } |
| enum class | climb_maneuver { down , up , over_obstacle } |
| Passed to climbing-related functions (slip_down) to indicate the climbing action being attempted. More... | |
Public Member Functions | |
| game () | |
| ~game () | |
| void | load_static_data () |
| Loads static data that does not depend on mods or similar. More... | |
| void | load_core_data (loading_ui &ui) |
| Loads core dynamic data. More... | |
| bool | is_core_data_loaded () const |
| Returns whether the core data is currently loaded. More... | |
| bool | check_mod_data (const std::vector< mod_id > &opts, loading_ui &ui) |
| Check if mods can be successfully loaded. More... | |
| void | load_world_modfiles (loading_ui &ui) |
| Loads core data and mods from the active world. More... | |
| bool | load_packs (const std::string &msg, const std::vector< mod_id > &packs, loading_ui &ui) |
| Load content packs. More... | |
| void | on_options_changed () |
| Should be invoked whenever options change. More... | |
| void | setup () |
| void | serialize (std::ostream &fout) |
| Saving and loading functions. More... | |
| void | unserialize (std::istream &fin, const cata_path &path) |
| void | unserialize_master (const cata_path &file_name, std::istream &fin) |
| void | unserialize_master (const JsonValue &jv) |
| bool | save () |
| Returns false if saving failed. More... | |
| std::vector< std::string > | list_active_saves () |
| Returns a list of currently active character saves. More... | |
| void | write_memorial_file (std::string sLastWords) |
| Writes information about the character out to a text file timestamped with the time of the file was made. More... | |
| void | start_calendar () |
| shared_ptr_fast< ui_adaptor > | create_or_get_main_ui_adaptor () |
| void | invalidate_main_ui_adaptor () const |
| void | mark_main_ui_adaptor_resize () const |
| void | draw (ui_adaptor &ui) |
| void | draw_ter (bool draw_sounds=true) |
| void | draw_ter (const tripoint ¢er, bool looking=false, bool draw_sounds=true) |
| void | add_draw_callback (const shared_ptr_fast< draw_callback_t > &cb) |
| void | init_draw_async_anim_curses (const tripoint &p, const std::string &ncstr, const nc_color &nccol) |
| void | draw_async_anim_curses () |
| void | void_async_anim_curses () |
| void | init_draw_blink_curses (const tripoint &p, const std::string &ncstr, const nc_color &nccol) |
| void | draw_blink_curses () |
| void | void_blink_curses () |
| bool | has_blink_curses () |
| void | draw_panels (bool force_draw=false) |
| std::optional< tripoint > | get_veh_dir_indicator_location (bool next) const |
| Returns the location where the indicator should go relative to the reality bubble, or nothing to indicate no indicator should be drawn. More... | |
| void | draw_veh_dir_indicator (bool next) |
| void | vertical_move (int z, bool force, bool peeking=false) |
| Moves the player vertically. More... | |
| void | start_hauling (const tripoint &pos) |
| std::optional< tripoint > | find_or_make_stairs (map &mp, int z_after, bool &rope_ladder, bool peeking, const tripoint &pos) |
| Returns the other end of the stairs (if any). More... | |
| std::optional< tripoint > | point_selection_menu (const std::vector< tripoint > &pts, bool up=true) |
| bool | vertical_shift (int z_after) |
| Actual z-level movement part of vertical_move. More... | |
| void | vertical_notes (int z_before, int z_after) |
| Add goes up/down auto_notes (if turned on) More... | |
| void | use_computer (const tripoint &p) |
| Checks to see if a player can use a computer (not illiterate, etc.) and uses if able. More... | |
| template<typename T = Creature> | |
| T * | critter_by_id (const character_id &id) |
| template<typename T = Creature> | |
| shared_ptr_fast< T > | shared_from (const T &critter) |
| Returns a shared pointer to the given critter (which can be of any of the subclasses of Creature). More... | |
| size_t | num_creatures () const |
| Returns the approximate number of creatures in the reality bubble. More... | |
| bool | update_zombie_pos (const monster &critter, const tripoint_abs_ms &old_pos, const tripoint_abs_ms &new_pos) |
| Redirects to the creature_tracker update_pos() function. More... | |
| void | remove_zombie (const monster &critter) |
| void | clear_zombies () |
| Redirects to the creature_tracker clear() function. More... | |
| bool | spawn_hallucination (const tripoint &p) |
| Spawns a hallucination at a determined position. More... | |
| bool | spawn_hallucination (const tripoint &p, const mtype_id &mt, std::optional< time_duration > lifespan) |
| Spawns a hallucination at a determined position of a given monster. More... | |
| bool | spawn_npc (const tripoint &p, const string_id< npc_template > &npc_class, std::string &unique_id, std::vector< trait_id > &traits, std::optional< time_duration > lifespan) |
| Spawns a npc at a determined position. More... | |
| bool | find_nearby_spawn_point (const tripoint &target, const mtype_id &mt, int min_radius, int max_radius, tripoint &point, bool outdoor_only, bool indoor_only, bool open_air_allowed=false) |
| Finds somewhere to spawn a monster or npc. More... | |
| bool | find_nearby_spawn_point (const tripoint &target, int min_radius, int max_radius, tripoint &point, bool outdoor_only, bool indoor_only, bool open_air_allowed=false) |
| bool | swap_critters (Creature &, Creature &) |
| Swaps positions of two creatures. More... | |
| Creature_range | all_creatures () |
| Returns an anonymous range that contains all creatures. More... | |
| monster_range | all_monsters () |
| Same as all_creatures but iterators only over monsters. More... | |
| npc_range | all_npcs () |
| Same as all_creatures but iterators only over npcs. More... | |
| std::vector< Creature * > | get_creatures_if (const std::function< bool(const Creature &)> &pred) |
| Returns all creatures matching a predicate. More... | |
| std::vector< Character * > | get_characters_if (const std::function< bool(const Character &)> &pred) |
| std::vector< npc * > | get_npcs_if (const std::function< bool(const npc &)> &pred) |
| Creature * | get_creature_if (const std::function< bool(const Creature &)> &pred) |
| Returns a creature matching a predicate. More... | |
| bool | is_empty (const tripoint &p) |
| Returns true if there is no player, NPC, or monster on the tile and move_cost > 0. More... | |
| bool | is_empty (const tripoint_bub_ms &p) |
| bool | is_in_sunlight (const tripoint &p) |
| Returns true if p is outdoors and it is sunny. More... | |
| bool | is_sheltered (const tripoint &p) |
| Returns true if p is indoors, underground, or in a car. More... | |
| bool | revive_corpse (const tripoint &p, item &it) |
| Revives a corpse at given location. More... | |
| bool | revive_corpse (const tripoint &p, item &it, int radius) |
| void | save_cyborg (item *cyborg, const tripoint &couch_pos, Character &installer) |
| Turns Broken Cyborg monster into Cyborg NPC via surgery. More... | |
| bool | cancel_activity_query (const std::string &text) |
| Asks if the player wants to cancel their activity, and if so cancels it. More... | |
| bool | cancel_activity_or_ignore_query (distraction_type type, const std::string &text) |
| Asks if the player wants to cancel their activity and if so cancels it. More... | |
| bool | portal_storm_query (distraction_type type, const std::string &text) |
| void | moving_vehicle_dismount (const tripoint &dest_loc) |
| Handles players exiting from moving vehicles. More... | |
| vehicle * | remoteveh () |
| Returns the current remotely controlled vehicle. More... | |
| void | setremoteveh (vehicle *veh) |
| Sets the current remotely controlled vehicle. More... | |
| int | assign_mission_id () |
| Returns the next available mission id. More... | |
| npc * | find_npc (character_id id) |
| Find the npc with the given ID. More... | |
| npc * | find_npc_by_unique_id (const std::string &unique_id) |
| Find the npc with the given unique ID. More... | |
| void | load_npcs () |
| Makes any nearby NPCs on the overmap active. More... | |
| void | reload_npcs () |
| Unloads, then loads the NPCs. More... | |
| void | remove_npc (character_id const &id) |
| const kill_tracker & | get_kill_tracker () const |
| stats_tracker & | stats () |
| achievements_tracker & | achievements () |
| void | add_npc_follower (const character_id &id) |
| Add follower id to set of followers. More... | |
| void | remove_npc_follower (const character_id &id) |
| Remove follower id from follower set. More... | |
| std::set< character_id > | get_follower_list () |
| Get set of followers. More... | |
| void | validate_npc_followers () |
| validate list of followers to account for overmap buffers More... | |
| void | validate_mounted_npcs () |
| void | validate_linked_vehicles () |
| validate towed vehicles so they get linked up again after a load More... | |
| void | validate_camps () |
| validate camps to ensure they are on the overmap list More... | |
| void | catch_a_monster (monster *fish, const tripoint &pos, Character *p, const time_duration &catch_duration) |
| Picks and spawns a random fish from the remaining fish list when a fish is caught. More... | |
| std::unordered_set< tripoint > | get_fishable_locations (int distance, const tripoint &fish_pos) |
| Get the contiguous fishable locations starting at fish_pos, out to the specified distance. More... | |
| std::vector< monster * > | get_fishable_monsters (std::unordered_set< tripoint > &fishable_locations) |
| Get the fishable monsters within the provided fishable locations. More... | |
| void | water_affect_items (Character &ch) const |
| Destroy / dissolve character items when in water. More... | |
| bool | fling_creature (Creature *c, const units::angle &dir, float flvel, bool controlled=false, bool intentional=false) |
| Flings the input creature in the given direction. More... | |
| float | natural_light_level (int zlev) const |
| unsigned char | light_level (int zlev) const |
| Returns coarse number-of-squares of visibility at the current light level. More... | |
| void | reset_light_level () |
| character_id | assign_npc_id () |
| Creature * | is_hostile_nearby () |
| Creature * | is_hostile_very_close (bool dangerous=false) |
| field_entry * | is_in_dangerous_field () |
| point | update_map (Character &p, bool z_level_changed=false) |
| point | update_map (int &x, int &y, bool z_level_changed=false) |
| void | update_overmap_seen () |
| void | peek () |
| void | peek (const tripoint &p) |
| std::optional< tripoint > | look_debug () |
| bool | check_zone (const zone_type_id &type, const tripoint &where) const |
| bool | check_near_zone (const zone_type_id &type, const tripoint &where) const |
| Checks whether or not there is a zone of particular type nearby. More... | |
| bool | is_zones_manager_open () const |
| void | zones_manager () |
| std::optional< std::vector< tripoint_bub_ms > > | safe_route_to (Character &who, const tripoint_bub_ms &target, int threshold, const std::function< void(const std::string &msg)> &report) const |
| attempt to find a safe route (avoids tiles dangerous to 'who'). More... | |
| std::optional< tripoint > | look_around () |
| look_around_result | look_around (bool show_window, tripoint ¢er, const tripoint &start_point, bool has_first_point, bool select_zone, bool peeking, bool is_moving_zone=false, const tripoint &end_point=tripoint_zero, bool change_lv=true) |
| look_around_result | look_around (look_around_params) |
| void | pre_print_all_tile_info (const tripoint &lp, const catacurses::window &w_info, int &line, int last_line, const visibility_variables &cache) |
| void | print_all_tile_info (const tripoint &lp, const catacurses::window &w_look, const std::string &area_name, int column, int &line, int last_line, const visibility_variables &cache) |
| void | draw_look_around_cursor (const tripoint &lp, const visibility_variables &cache) |
| void | extended_description (const tripoint &p) |
| Long description of (visible) things at tile. More... | |
| void | draw_trail_to_square (const tripoint &t, bool bDrawX) |
| int | inventory_item_menu (item_location locThisItem, const std::function< int()> &startx=[]() { return 0;}, const std::function< int()> &width=[]() { return 50;}, inventory_item_menu_position position=RIGHT_OF_INFO) |
| item_location | inv_map_splice (const item_filter &filter, const std::string &title, int radius=0, const std::string &none_message="") |
| Custom-filtered menu for inventory and nearby items and those that within specified radius. More... | |
| item_location | inv_map_splice (const item_location_filter &filter, const std::string &title, int radius=0, const std::string &none_message="") |
| bool | has_gametype () const |
| special_game_type | gametype () const |
| void | toggle_fullscreen () |
| void | toggle_pixel_minimap () const |
| void | toggle_language_to_en () |
| bool | is_tileset_isometric () const |
| void | reload_tileset () |
| void | temp_exit_fullscreen () |
| void | reenter_fullscreen () |
| void | zoom_in_overmap () |
| void | zoom_out_overmap () |
| void | zoom_in () |
| void | zoom_out () |
| void | reset_zoom () |
| void | set_zoom (int level) |
| int | get_zoom () const |
| int | get_moves_since_last_save () const |
| int | get_user_action_counter () const |
| bool | take_screenshot (const std::string &file_path) const |
| Saves a screenshot of the current viewport, as a PNG file, to the given location. More... | |
| bool | take_screenshot () const |
| Saves a screenshot of the current viewport, as a PNG file. More... | |
| void | load_map (const tripoint_abs_sm &pos_sm, bool pump_events=false) |
| Load the main map at given location, see map::load, in global, absolute submap coordinates. More... | |
| overmap & | get_cur_om () const |
| The overmap which contains the center submap of the reality bubble. More... | |
| std::vector< npc * > | allies () |
| Get all living player allies. More... | |
| void | set_driving_view_offset (const point &p) |
| void | calc_driving_offset (vehicle *veh=nullptr) |
| void | open_gate (const tripoint &p) |
| void | open_gate (const tripoint_bub_ms &p) |
| void | knockback (const tripoint &s, const tripoint &t, int force, int stun, int dam_mult) |
| void | knockback (std::vector< tripoint > &traj, int stun, int dam_mult) |
| void | draw_bullet (const tripoint &t, int i, const std::vector< tripoint > &trajectory, char bullet) |
| void | draw_hit_mon (const tripoint &p, const monster &m, bool dead=false) |
| void | draw_hit_player (const Character &p, int dam) |
| void | draw_line (const tripoint &p, const tripoint ¢er_point, const std::vector< tripoint > &points, bool noreveal=false) |
| void | draw_line (const tripoint_bub_ms &p, const tripoint_bub_ms ¢er_point, const std::vector< tripoint_bub_ms > &points, bool noreveal=false) |
| void | draw_line (const tripoint &p, const std::vector< tripoint > &points) |
| void | draw_weather (const weather_printable &wPrint) const |
| void | draw_sct () const |
| void | draw_zones (const tripoint &start, const tripoint &end, const tripoint &offset) const |
| void | draw_critter (const Creature &critter, const tripoint ¢er) |
| void | draw_cursor (const tripoint &p) const |
| void | draw_highlight (const tripoint &p) |
| void | draw_async_anim (const tripoint &p, const std::string &tile_id, const std::string &ncstr="", const nc_color &nccol=c_black) |
| void | draw_radiation_override (const tripoint &p, int rad) |
| void | draw_terrain_override (const tripoint &p, const ter_id &id) |
| void | draw_furniture_override (const tripoint &p, const furn_id &id) |
| void | draw_graffiti_override (const tripoint &p, bool has) |
| void | draw_trap_override (const tripoint &p, const trap_id &id) |
| void | draw_field_override (const tripoint &p, const field_type_id &id) |
| void | draw_item_override (const tripoint &p, const itype_id &id, const mtype_id &mid, bool hilite) |
| void | draw_vpart_override (const tripoint &p, const vpart_id &id, int part_mod, const units::angle &veh_dir, bool hilite, const point &mount) |
| void | draw_below_override (const tripoint &p, bool draw) |
| void | draw_monster_override (const tripoint &p, const mtype_id &id, int count, bool more, Creature::Attitude att) |
| bool | is_in_viewport (const tripoint &p, int margin=0) const |
| bool | check_safe_mode_allowed (bool repeat_safe_mode_warnings=true) |
| Check whether movement is allowed according to safe mode settings. More... | |
| void | set_safe_mode (safe_mode_type mode) |
| void | exam_appliance (vehicle &veh, const point &cp=point_zero) |
| open appliance interaction screen More... | |
| void | exam_vehicle (vehicle &veh, const point &cp=point_zero) |
| open vehicle interaction screen More... | |
| bool | forced_door_closing (const tripoint &p, const ter_id &door_type, int bash_dmg) |
| bool | forced_door_closing (const tripoint_bub_ms &p, const ter_id &door_type, int bash_dmg) |
| bool | load (const std::string &world) |
| Attempt to load first valid save (if any) in world. More... | |
| bool | npc_menu (npc &who) |
| Returns true if the menu handled stuff and player shouldn't do anything else. More... | |
| bool | phasing_move (const tripoint &dest, bool via_ramp=false) |
| bool | can_move_furniture (tripoint fdest, const tripoint &dp) |
| bool | walk_move (const tripoint &dest, bool via_ramp=false, bool furniture_move=false) |
| void | on_move_effects () |
| int | grabbed_furn_move_time (const tripoint &dp) |
| bool | grabbed_furn_move (const tripoint &dp) |
| void | reload_item () |
| void | reload_wielded (bool prompt=false) |
| void | reload_weapon (bool try_everything=true) |
| void | insert_item () |
| void | insert_item (drop_locations &targets) |
| point | place_player (const tripoint &dest, bool quick=false) |
| void | place_player_overmap (const tripoint_abs_omt &om_dest, bool move_player=true) |
| void | perhaps_add_random_npc (bool ignore_spawn_timers_and_rates) |
| unsigned int | get_seed () const |
| void | set_npcs_dirty () |
| If invoked, NPCs will be reloaded before next turn. More... | |
| void | set_critter_died () |
| If invoked, dead will be cleaned this turn. More... | |
| void | mon_info_update () |
| void | cleanup_dead () |
| bool | is_dangerous_tile (const tripoint &dest_loc) const |
| std::vector< std::string > | get_dangerous_tile (const tripoint &dest_loc) const |
| bool | prompt_dangerous_tile (const tripoint &dest_loc) const |
| void | pickup (const tripoint &p) |
| void | despawn_monster (monster &critter) |
| Despawn a specific monster, it's stored on the overmap. More... | |
| void | despawn_nonlocal_monsters () |
| bool | disable_robot (const tripoint &p) |
| If there is a robot (that can be disabled), query the player and try to disable it. More... | |
| void | draw_pixel_minimap (const catacurses::window &w) |
| void | quicksave () |
| void | quickload () |
| void | disp_NPCs () |
| void | list_missions () |
| void | update_unique_npc_location (const std::string &id, point_abs_om loc) |
| point_abs_om | get_unique_npc_location (const std::string &id) |
| bool | unique_npc_exists (const std::string &id) |
| void | unique_npc_despawn (const std::string &id) |
| spell_events & | spell_events_subscriber () |
| void | display_toggle_overlay (action_id) |
| bool | display_overlay_state (action_id) |
| void | toggle_debug_hour_timer () |
| tripoint | mouse_edge_scrolling_terrain (input_context &ctxt) |
| Used to implement mouse "edge scrolling". More... | |
| tripoint | mouse_edge_scrolling_overmap (input_context &ctxt) |
| This variant is suitable for the overmap. More... | |
| void | shift_destination_preview (const point &delta) |
| bool | slip_down (climb_maneuver maneuver, climbing_aid_id aid=climbing_aid_id::NULL_ID(), bool show_chance_messages=true) |
| Checks if player is able to successfully climb to/from some terrain and not slip down. More... | |
| int | slip_down_chance (climb_maneuver maneuver, climbing_aid_id aid=climbing_aid_id::NULL_ID(), bool show_chance_messages=true) |
| Calculates the chance that slip_down will return true. More... | |
| void | climb_down (const tripoint &examp) |
| Climb down from a ledge. More... | |
| void | climb_down_menu_gen (const tripoint &examp, uilist &cmenu) |
| bool | climb_down_menu_pick (const tripoint &examp, int retval) |
| void | climb_down_using (const tripoint &examp, climbing_aid_id aid, bool deploy_affordance=false) |
| monster * | place_critter_at (const mtype_id &id, const tripoint &p) |
| Adds critters to the reality bubble, creating them if necessary. More... | |
| monster * | place_critter_at (const shared_ptr_fast< monster > &mon, const tripoint &p) |
| monster * | place_critter_around (const mtype_id &id, const tripoint ¢er, int radius) |
| monster * | place_critter_around (const shared_ptr_fast< monster > &mon, const tripoint ¢er, int radius, bool forced=false) |
| monster * | place_critter_within (const mtype_id &id, const tripoint_range< tripoint > &range) |
| monster * | place_critter_within (const shared_ptr_fast< monster > &mon, const tripoint_range< tripoint > &range) |
Static Public Member Functions | |
| static void | display_om_pathfinding_progress (size_t open_set, size_t known_size) |
Protected Member Functions | |
| void | load_data_from_dir (const cata_path &path, const std::string &src, loading_ui &ui) |
| Loads dynamic data from the given directory. More... | |
Protected Attributes | |
| std::map< tripoint, std::pair< std::string, nc_color > > | async_anim_layer_curses |
| std::map< tripoint, std::pair< std::string, nc_color > > | blink_layer_curses |
Private Types | |
| enum class | vmenu_ret : int { CHANGE_TAB , QUIT , FIRE } |
Private Member Functions | |
| void | unload_npcs () |
| Unloads all NPCs. More... | |
| bool | load (const save_t &name) |
| void | load_master () |
| bool | start_game () |
| bool | save_factions_missions_npcs () |
| void | reset_npc_dispositions () |
| void | serialize_master (std::ostream &fout) |
| bool | save_maps () |
| void | init_autosave () |
| void | create_starting_npcs () |
| vehicle * | place_vehicle_nearby (const vproto_id &id, const point_abs_omt &origin, int min_distance, int max_distance, const std::vector< std::string > &omt_search_types={}) |
| void | list_items_monsters () |
| game::vmenu_ret | list_items (const std::vector< map_item_stack > &item_list) |
| std::vector< map_item_stack > | find_nearby_items (int iRadius) |
| void | reset_item_list_state (const catacurses::window &window, int height, bool bRadiusSort) |
| game::vmenu_ret | list_monsters (const std::vector< Creature * > &monster_list) |
| bool | grabbed_move (const tripoint &dp, bool via_ramp) |
| Check for dangerous stuff at dest_loc, return false if the player decides not to step there. More... | |
| bool | grabbed_veh_move (const tripoint &dp) |
| void | control_vehicle () |
| void | examine (const tripoint &p, bool with_pickup=false) |
| void | examine (bool with_pickup=true) |
| void | pickup () |
| void | pickup_all () |
| void | unload_container () |
| void | drop_in_direction (const tripoint &pnt) |
| void | butcher () |
| void | reload (item_location &loc, bool prompt=false, bool empty=true) |
| void | wield () |
| void | wield (item_location loc) |
| void | chat () |
| void | print_fields_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line) |
| void | print_terrain_info (const tripoint &lp, const catacurses::window &w_look, const std::string &area_name, int column, int &line) |
| void | print_furniture_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line) |
| void | print_trap_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line) |
| void | print_part_con_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line) |
| void | print_creature_info (const Creature *creature, const catacurses::window &w_look, int column, int &line, int last_line) |
| void | print_vehicle_info (const vehicle *veh, int veh_part, const catacurses::window &w_look, int column, int &line, int last_line) |
| void | print_visibility_info (const catacurses::window &w_look, int column, int &line, visibility_type visibility) |
| void | print_items_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line, int last_line) |
| void | print_graffiti_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line, int last_line) |
| input_context | get_player_input (std::string &action) |
| void | shift_monsters (const tripoint &shift) |
| Shift all active monsters, the shift vector is the number of shifted submaps. More... | |
| void | open_consume_item_menu () |
| bool | do_regular_action (action_id &act, avatar &player_character, const std::optional< tripoint > &mouse_target) |
| bool | handle_action () |
| bool | try_get_right_click_action (action_id &act, const tripoint_bub_ms &mouse_target) |
| bool | try_get_left_click_action (action_id &act, const tripoint_bub_ms &mouse_target) |
| void | item_action_menu (item_location loc=item_location()) |
| bool | is_game_over () |
| void | bury_screen () const |
| void | death_screen () |
| void | draw_minimap () |
| void | autosave () |
| bool | handle_mouseview (input_context &ctxt, std::string &action) |
| void | display_faction_epilogues () |
| void | disp_NPC_epilogues () |
| void | display_scent () |
| void | display_temperature () |
| void | display_vehicle_ai () |
| void | display_visibility () |
| void | display_lighting () |
| void | display_radiation () |
| void | display_transparency () |
| Creature * | is_hostile_within (int distance, bool dangerous=false) |
| Checks if there's a hostile creature within given distance. More... | |
| void | move_save_to_graveyard () |
| bool | save_player_data () |
| bool | save_achievements () |
| event_bus & | events () |
| memorial_logger & | memorial () |
| std::pair< tripoint, tripoint > | mouse_edge_scrolling (input_context &ctxt, int speed, const tripoint &last, bool iso) |
Friends | |
| class | editmap |
| class | advanced_inventory |
| class | main_menu |
| class | exosuit_interact |
| class | monster_range |
| class | Creature_range |
| achievements_tracker & | get_achievements () |
| event_bus & | get_event_bus () |
| map & | get_map () |
| creature_tracker & | get_creature_tracker () |
| Character & | get_player_character () |
| avatar & | get_avatar () |
| viewer & | get_player_view () |
| weather_manager & | get_weather () |
| const scenario * | get_scenario () |
| void | set_scenario (const scenario *new_scenario) |
| stats_tracker & | get_stats () |
| scent_map & | get_scent () |
| timed_event_manager & | get_timed_events () |
| memorial_logger & | get_memorial () |
| bool | do_turn () |
| MAIN GAME LOOP. More... | |
| bool | turn_handler::cleanup_at_end () |
| global_variables & | get_globals () |
|
strong |
|
strongprivate |
| game::game | ( | ) |
Definition at line 435 of file game.cpp.
References achievements_tracker_ptr, eoc_events_ptr, events(), first_redraw_since_waiting_started, kill_tracker_ptr, memorial_logger_ptr, reset_light_level(), spell_events_ptr, stats_tracker_ptr, event_bus::subscribe(), u, and world_generator.
|
default |
| achievements_tracker & game::achievements | ( | ) |
Definition at line 3432 of file game.cpp.
References achievements_tracker_ptr.
| void game::add_draw_callback | ( | const shared_ptr_fast< draw_callback_t > & | cb | ) |
Definition at line 3833 of file game.cpp.
References draw_callbacks, and invalidate_main_ui_adaptor().
Referenced by get_player_input(), list_items(), list_monsters(), look_around(), pickup(), and zones_manager().
| void game::add_npc_follower | ( | const character_id & | id | ) |
Add follower id to set of followers.
Definition at line 1725 of file game.cpp.
References avatar::follower_ids, follower_ids, and u.
Referenced by validate_npc_followers().
| game::Creature_range game::all_creatures | ( | ) |
Returns an anonymous range that contains all creatures.
The range allows iteration via a range-based for loop, e.g. for( Creature &critter : all_creatures() ) { ... }. One shall not store the returned range nor the iterators. One can freely remove and add creatures to the game during the iteration. Added creatures will not be iterated over.
Definition at line 13223 of file game.cpp.
References Creature_range.
Referenced by draw_ter(), get_creature_if(), and get_creatures_if().
| game::monster_range game::all_monsters | ( | ) |
Same as all_creatures but iterators only over monsters.
Definition at line 13228 of file game.cpp.
References monster_range.
Referenced by disp_NPCs(), get_fishable_monsters(), place_player_overmap(), shift_monsters(), start_game(), validate_mounted_npcs(), and vertical_move().
| game::npc_range game::all_npcs | ( | ) |
Same as all_creatures but iterators only over npcs.
Definition at line 13233 of file game.cpp.
Referenced by cancel_activity_query(), get_characters_if(), and get_npcs_if().
| std::vector< npc * > game::allies | ( | ) |
Get all living player allies.
Definition at line 13119 of file game.cpp.
References get_npcs_if(), and npc::is_hallucination().
| int game::assign_mission_id | ( | ) |
Returns the next available mission id.
Definition at line 1708 of file game.cpp.
References next_mission_id, and cata::hash64_detail::ret.
| character_id game::assign_npc_id | ( | ) |
Definition at line 4466 of file game.cpp.
References next_npc_id, and cata::hash64_detail::ret.
Referenced by load(), and start_game().
|
private |
Definition at line 13093 of file game.cpp.
References last_save_timestamp, and quicksave().
|
private |
Definition at line 2794 of file game.cpp.
References _, c_brown, c_green, c_light_gray, c_magenta, c_red, c_white, center_print(), sfx::context_themes, sfx::do_player_death_hurt(), draw_border(), sfx::fade_audio_group(), FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, g, game_avatar_death, get_avatar, get_event_bus, Character::get_name(), get_player_character, Character::getID(), visitable::has_amount(), Character::has_trait(), itype_holybook_bible1, itype_holybook_bible2, itype_holybook_bible3, Character::male, string_input_popup::max_length(), mk_wcwidth(), mvwprintz(), mvwputch(), Character::name, catacurses::newwin(), point, string_input_popup::query_string(), QUIT_SUICIDE, event_bus::send(), om_direction::size, sfx::sleepiness, calendar::start_of_game, string_format(), TERMX, TERMY, sfx::time_of_day, trait_CANNIBAL, trait_PSYCHOPATH, calendar::turn, u, uquit, UTF8_getch(), utf8_width(), sfx::weather, string_input_popup::window(), and wprintz().
Referenced by is_game_over().
|
private |
Definition at line 9642 of file game.cpp.
References _, Character::activity, add_corpses(), add_disassemblables(), add_msg(), add_salvagables(), uilist::addentry(), uilist::addentry_col(), Character::assign_activity(), item_stack::begin(), butcher_submenu(), Character::can_disassemble(), Character::controlling_vehicle, Character::crafting_inventory(), debugmsg, Character::disassemble(), Character::disassemble_all(), Creature::disp_name(), item_stack::end(), time_duration::from_moves(), generate_butcher_stack_display(), use_function::get_actor_ptr(), Character::get_crafting_helpers(), Character::get_item_position(), get_player_character, item::get_recursive_disassemble_moves(), recipe_dictionary::get_uncraft(), item::get_usable_item(), item::get_use(), map::has_flag(), Character::has_morale_to_craft(), map::i_at(), ignore_proficiencies, is_hostile_very_close(), visitable::items_with(), itype_disassembly, m, m_info, MAX_ITEM_IN_SQUARE, Character::max_quality(), PICKUP_RANGE, Creature::pos(), qual_BUTCHER, qual_CUT_FINE, uilist::query(), query_yn(), recipe::result(), cata::hash64_detail::ret, uilist::ret, map::sees_some_items(), item_stack::size(), ret_val_common::success(), player_activity::targets, uilist::text, TFLAG_SEALED, recipe::time_to_craft_moves(), salvage_actor::time_to_cut_up(), to_string_clipped(), salvage_actor::try_to_cut_up(), calendar::turn, u, and salvage_actor::valid_to_cut_up().
Referenced by do_regular_action().
| void game::calc_driving_offset | ( | vehicle * | veh = nullptr | ) |
Definition at line 1322 of file game.cpp.
References abs(), vehicle::cruise_velocity, driving_view_offset, units::fabs(), vehicle::face_vec(), catacurses::getmaxx(), catacurses::getmaxy(), inverse_lerp(), light_level(), max(), min(), vehicle::move_vec(), vehicle::player_in_control(), point, point_zero, Creature::posz(), set_driving_view_offset(), Character::sight_range(), vehicle::skidding, u, veh_lumi(), vehicle::velocity, vehicles::vmiph_per_tile, w_terrain, rl_vec2d::x, point::x, rl_vec2d::y, and point::y.
Definition at line 11356 of file game.cpp.
References creature_tracker::creature_at(), get_creature_tracker, Character::grab_point, map::has_flag(), map::has_floor_or_water(), map::has_furn(), is_empty(), trap::is_null(), m, map::passable(), Creature::pos(), TFLAG_FLAT, TFLAG_RAMP_DOWN, TFLAG_RAMP_UP, TFLAG_ROAD, map::tr_at(), u, map::veh_at(), and tripoint::xy().
Referenced by grabbed_furn_move(), and grabbed_furn_move_time().
| bool game::cancel_activity_or_ignore_query | ( | distraction_type | type, |
| const std::string & | text | ||
| ) |
Asks if the player wants to cancel their activity and if so cancels it.
Additionally checks if the player wants to ignore further distractions.
Definition at line 1455 of file game.cpp.
References ACT_TRAVELLING, action, query_popup::result::action, Character::activity, input_context::allow_all_keys(), Character::backlog, Character::cancel_activity(), cancel_auto_move(), query_popup::context(), input_context::disallow_lower_case_or_non_modified_letters(), Character::get_auto_move_route(), get_distraction_manager(), player_activity::get_stop_phrase(), Character::has_distant_destination(), player_activity::ignore_distraction(), player_activity::is_distraction_ignored(), is_keycode_mode_supported(), keycode, query_popup::message(), query_popup::option(), pgettext, query_popup::preferred_keyboard_mode(), query_popup::query(), ui_manager::redraw(), refresh_display(), Character::set_destination(), distraction_manager::distraction_manager_gui::show(), type, and u.
Referenced by mon_info_update().
| bool game::cancel_activity_query | ( | const std::string & | text | ) |
Asks if the player wants to cancel their activity, and if so cancels it.
Definition at line 1551 of file game.cpp.
References ACT_TRAIN, ACT_TRAIN_TEACHER, ACT_TRAVELLING, Character::activity, all_npcs(), Character::cancel_activity(), cancel_auto_move(), Character::clear_destination(), effect_asked_to_train, g, Character::get_auto_move_route(), player_activity::get_stop_phrase(), Character::has_destination(), Character::has_distant_destination(), player_activity::id(), player_activity::index, query_yn(), Creature::remove_effect(), Character::resume_backlog_activity(), Character::set_destination(), u, and player_activity::values.
| void game::catch_a_monster | ( | monster * | fish, |
| const tripoint & | pos, | ||
| Character * | p, | ||
| const time_duration & | catch_duration | ||
| ) |
Picks and spawns a random fish from the remaining fish list when a fish is caught.
Definition at line 1427 of file game.cpp.
References _, map::add_item_or_charges(), Character::add_msg_if_player(), monster::die(), mtype::id, m, m_good, item::make_corpse(), mtype::nname(), monster::no_corpse_quiet, math_opers::pos(), rng(), Character::sees(), calendar::turn, monster::type, and u.
|
private |
Definition at line 797 of file npctalk.cpp.
References _, add_msg(), uilist::addentry(), Creature::as_monster(), Creature::as_npc(), talk_function::assign_guard(), assign_veh_to_follow(), available, mtype::chat_topics, talk_function::clear_overrides(), creature_select_menu(), Character::disp_name(), monster::disp_name(), talk_function::do_butcher(), talk_function::do_chop_plank(), talk_function::do_chop_trees(), talk_function::do_construction(), talk_function::do_craft(), talk_function::do_disassembly(), talk_function::do_farming(), talk_function::do_fishing(), talk_function::do_mining(), talk_function::do_mopping(), talk_function::do_read_repeatedly(), talk_function::do_vehicle_deconstruct(), talk_function::do_vehicle_repair(), effect_asked_to_train, effect_riding, talk_function::find_mount(), fuel_type_animal, vehicle::get_all_parts(), get_avatar, get_creatures_if(), Character::get_knowledge_level(), get_map, get_npcs_if(), get_player_character, Character::get_shout_volume(), Character::get_skill_level(), Character::get_speed(), get_talker_for(), map::getglobal(), Creature::has_effect(), vehicle::has_engine_type(), monster::has_flag(), vpart_info::has_flag(), Character::has_martialart(), Character::has_proficiency(), Character::has_trait(), map::impassable(), vehicle::is_following, Creature::is_monster(), Creature::is_npc(), vehicle::is_owned_by(), string_id< T >::is_valid(), Character::is_wearing(), itype_foodperson_mask, itype_foodperson_mask_on, look_around(), m_info, m_warning, Character::magic, vehicle::magic, matype_id, mapgen_defer::message, Creature::mod_moves(), mon_flag_CONVERSATION, npc::name_and_activity(), npc_activities_menu(), NPC_CHAT_ACTIVITIES, NPC_CHAT_ACTIVITIES_BUTCHERY, NPC_CHAT_ACTIVITIES_CHOP_PLANKS, NPC_CHAT_ACTIVITIES_CHOP_TREES, NPC_CHAT_ACTIVITIES_CONSTRUCTION, NPC_CHAT_ACTIVITIES_CRAFT, NPC_CHAT_ACTIVITIES_DISASSEMBLY, NPC_CHAT_ACTIVITIES_FARMING, NPC_CHAT_ACTIVITIES_FISHING, NPC_CHAT_ACTIVITIES_MINING, NPC_CHAT_ACTIVITIES_MOPPING, NPC_CHAT_ACTIVITIES_MOVE_LOOT, NPC_CHAT_ACTIVITIES_READ_REPEATEDLY, NPC_CHAT_ACTIVITIES_UNASSIGN, NPC_CHAT_ACTIVITIES_VEHICLE_DECONSTRUCTION, NPC_CHAT_ACTIVITIES_VEHICLE_REPAIR, NPC_CHAT_ANIMAL_VEHICLE_FOLLOW, NPC_CHAT_ANIMAL_VEHICLE_STOP_FOLLOW, NPC_CHAT_AWAKE, NPC_CHAT_CLEAR_OVERRIDES, NPC_CHAT_COMMAND_MAGIC_VEHICLE_FOLLOW, NPC_CHAT_COMMAND_MAGIC_VEHICLE_STOP_FOLLOW, NPC_CHAT_DANGER, NPC_CHAT_DISMOUNT, NPC_CHAT_EMOTE, NPC_CHAT_FOLLOW, NPC_CHAT_GUARD, NPC_CHAT_MOUNT, NPC_CHAT_MOVE_TO_POS, NPC_CHAT_ORDERS, NPC_CHAT_SENTENCE, NPC_CHAT_START_SEMINAR, NPC_CHAT_TALK, NPC_CHAT_YELL, NPC_MISSION_GUARD_ALLY, npc_select_menu(), npc_temp_orders_menu(), npcs_select_menu(), popup(), Creature::pos(), Creature::posz(), talk_function::teach_domain::prof, proficiency_id, uilist::query(), uilist::ret, talk_function::revert_activity(), rl_dist(), Character::sees(), SEEX, Character::shout(), talk_function::teach_domain::skill, skill_id, talk_function::sort_loot(), talk_function::teach_domain::spell, spell_id, talk_function::start_training_gen(), talk_function::stop_guard(), string_format(), talk_function::teach_domain::style, avatar::talk_to(), tell_magic_veh_stop_following(), tell_magic_veh_to_follow(), tell_veh_stop_following(), uilist::text, music::title, training_select_menu(), trait_PROF_FOODP, monster::type, u, and talk_function::wake_up().
Referenced by do_regular_action().
| bool game::check_mod_data | ( | const std::vector< mod_id > & | opts, |
| loading_ui & | ui | ||
| ) |
Check if mods can be successfully loaded.
| opts | check specific mods (or all if unspecified) |
Definition at line 489 of file game.cpp.
References check(), mapbuffer::clear(), overmapbuffer::clear(), DynamicDataLoader::finalize_loaded_data(), dependency_tree::get_dependencies_of_X_as_strings(), DynamicDataLoader::get_instance(), dependency_tree::get_node(), dependency_tree::is_available(), load_core_data(), load_data_from_dir(), MAPBUFFER, overmap_buffer, dependency_node::s_errors(), and world_generator.
| bool game::check_near_zone | ( | const zone_type_id & | type, |
| const tripoint & | where | ||
| ) | const |
Checks whether or not there is a zone of particular type nearby.
Definition at line 6852 of file game.cpp.
References zone_manager::get_manager(), map::getglobal(), zone_manager::has_near(), m, and type.
| bool game::check_safe_mode_allowed | ( | bool | repeat_safe_mode_warnings = true | ) |
Check whether movement is allowed according to safe mode settings.
Definition at line 10223 of file game.cpp.
References _, a, ACTION_IGNORE_ENEMY, ACTION_TOGGLE_SAFEMODE, ACTION_WHITELIST_ENEMY, add_msg(), b, c_light_blue, c_red, colorize(), Character::controlling_vehicle, direction_from(), direction_name(), effect_laserlocked, Character::get_int_base(), avatar::get_mon_visible(), get_safemode(), gmf_bypass_cooldown, Creature::has_effect(), Character::has_trait(), safemode::lastmon_whitelist, m_warning, max(), min(), n_gettext, monster::name(), monster_visible_info::new_seen_mon, safemode::npc_type_name(), pgettext, Creature::pos(), press_x(), rl_dist(), safe_mode, SAFE_MODE_STOP, safe_mode_warning_logged, string_format(), trait_PROF_CHURL, u, utf8_to_wstr(), and wstr_to_utf8().
Referenced by do_regular_action().
| bool game::check_zone | ( | const zone_type_id & | type, |
| const tripoint & | where | ||
| ) | const |
Definition at line 6847 of file game.cpp.
References zone_manager::get_manager(), map::getglobal(), zone_manager::has(), m, and type.
Referenced by place_player().
| void game::cleanup_dead | ( | ) |
Definition at line 4813 of file game.cpp.
References critter_died, critter_tracker, get_avatar, avatar::get_mon_visible(), overmap_buffer, overmapbuffer::remove_npc(), monster_visible_info::remove_npc(), and remove_npc_follower().
| void game::clear_zombies | ( | ) |
Redirects to the creature_tracker clear() function.
Definition at line 5290 of file game.cpp.
References critter_tracker.
Referenced by setup().
| void game::climb_down | ( | const tripoint & | examp | ) |
Climb down from a ledge.
Player is prompted to deploy grappling hook, webs or detach vines if applicable. Otherwise the safest available affordance (see above) is detected and used. The player is shown a confirmation query with an assessment of falling risk and damage.
Definition at line 13536 of file game.cpp.
References _, climb_down_menu_gen(), climb_down_menu_pick(), uilist::entries, uilist::query(), uilist::ret, and uilist::text.
Referenced by do_regular_action().
Definition at line 13452 of file game.cpp.
References _, add_msg_debug, Character::add_msg_if_player(), uilist::addentry(), climb_affordance_menu_encode(), climbing_aid::detect_conditions(), debugmode::DF_IEXAMINE, map::disp_name(), get_map, get_player_character, climbing_aid::fall_scan::height, climbing_aid::fall_scan::height_until_creature, climbing_aid::fall_scan::height_until_furniture, climbing_aid::list(), climbing_aid::list_all(), m, min(), Creature::pos(), climbing_aid::fall_scan::pos_furniture_or_floor(), string_format(), and map::valid_move().
Referenced by climb_down().
| bool game::climb_down_menu_pick | ( | const tripoint & | examp, |
| int | retval | ||
| ) |
Definition at line 13524 of file game.cpp.
References climb_affordance_menu_decode(), climb_down_using(), and climbing_aid_default.
Referenced by climb_down().
| void game::climb_down_using | ( | const tripoint & | examp, |
| climbing_aid_id | aid, | ||
| bool | deploy_affordance = false |
||
| ) |
Definition at line 13552 of file game.cpp.
References _, ACTIVE_EXERCISE, add_msg_debug, Character::add_msg_if_player(), Character::apply_damage(), climbing_aid::base_condition, climbing_aid::condition::cat, Character::climbing_cost(), climbing_aid::down_t::confirm_text, climbing_aid::down_t::cost, climbing_aid::climb_cost::damage, climbing_aid::down_t::deploy_furn, climbing_aid::down_t::deploys_furniture(), debugmode::DF_GAME, debugmode::DF_IEXAMINE, map::disp_name(), climbing_aid::down, down, climbing_aid::down_t::easy_climb_back_up, translation::empty(), Character::exertion_adjusted_move_multiplier(), Character::fall_damage_mod(), climbing_aid::condition::flag, map::furn_set(), g, get_map, get_player_character, map::has_flag(), climbing_aid::fall_scan::height, climbing_aid::item, climbing_aid::climb_cost::kcal, m, climbing_aid::down_t::max_height, Creature::mod_moves(), Character::mod_pain(), Character::mod_stored_kcal(), Character::mod_thirst(), Character::move_effects(), climbing_aid::down_t::msg_after, climbing_aid::down_t::msg_before, n_gettext, string_id< T >::obj(), climbing_aid::climb_cost::pain, Creature::pos(), climbing_aid::fall_scan::pos_bottom(), climbing_aid::fall_scan::pos_furniture_or_floor(), query_yn(), Character::set_activity_level(), Creature::set_moves(), Character::set_underwater(), Creature::setpos(), slip_down_chance(), string_format(), TFLAG_DEEP_WATER, climbing_aid::climb_cost::thirst, translation::translated(), Character::use_amount(), climbing_aid::condition::uses_item, map::valid_move(), and tripoint::z.
Referenced by climb_down_menu_pick().
|
private |
Definition at line 5842 of file game.cpp.
References _, add_msg(), vehicle::autopilot_on, vehicle::avail_part_with_feature(), choose_adjacent(), Character::controlling_vehicle, vehicle::engine_on, fuel_type_animal, vehicle::get_harnessed_animal(), get_player_character, vehicle::get_points(), map::getglobal(), vehicle::handle_potential_theft(), vehicle::has_engine_type(), Character::in_vehicle, vehicle::interact_with(), vehicle::is_autodriving, vehicle::is_following, vehicle::is_locked, vehicle::is_patrolling, m, m_info, avatar::memorize_clear_decoration(), map::memory_cache_dec_set_dirty(), vehicle::name, optional_vpart_position::part_with_feature(), vehicle::player_in_control(), map::points_in_radius(), Creature::pos(), math_opers::pos(), remoteveh(), vehicle::start_engines(), u, map::veh_at(), and vehicle::vehicle().
Referenced by do_regular_action().
| shared_ptr_fast< ui_adaptor > game::create_or_get_main_ui_adaptor | ( | ) |
In tiles mode w_terrain can have a different font (with a different tile dimension) or can be drawn by cata_tiles which uses tiles that again might have a different dimension then the normal font used everywhere else.
TERRAIN_WINDOW_WIDTH/TERRAIN_WINDOW_HEIGHT defines how many squares can be displayed in w_terrain (using it's specific tile dimension), not including partially drawn squares at the right/bottom. You should use it whenever you want to draw specific squares in that window or to determine whether a specific square is draw on screen (or outside the screen and needs scrolling).
TERRAIN_WINDOW_TERM_WIDTH/TERRAIN_WINDOW_TERM_HEIGHT defines the size of w_terrain in the standard font dimension (the font that everything else uses). You usually don't have to use it, expect for positioning of windows, because the window positions use the standard font dimension.
The code here calculates size available for w_terrain, caps it at max_view_size (the maximal view range than any character can have at any time). It is stored in TERRAIN_WINDOW_*.
Definition at line 3735 of file game.cpp.
References g, panel_manager::get_manager(), panel_manager::get_width_left(), panel_manager::get_width_right(), main_ui_adaptor, MINIMAP_HEIGHT, MINIMAP_WIDTH, catacurses::newwin(), point, point_zero, POSX, POSY, catacurses::stdscr, TERMX, TERMY, TERRAIN_WINDOW_HEIGHT, TERRAIN_WINDOW_TERM_HEIGHT, TERRAIN_WINDOW_TERM_WIDTH, TERRAIN_WINDOW_WIDTH, to_map_font_dimension(), w_minimap, w_minimap_ptr, w_pixel_minimap, w_terrain, and w_terrain_ptr.
|
private |
Definition at line 1277 of file game.cpp.
References faction_no_faction, Creature::get_location(), overmapbuffer::get_npcs_near_player(), overmapbuffer::insert_npc(), NC_DOCTOR, NC_NONE, NPC_MISSION_SHELTER, NPCATT_NULL, one_in(), ORIGIN_OPENER_NPC, overmap_buffer, point_north_west, mission::reserve_random(), trait_NPC_STARTING_NPC, and u.
Referenced by start_game().
| template Creature * game::critter_by_id< Creature > | ( | const character_id & | id | ) |
Definition at line 5155 of file game.cpp.
References find_npc(), Character::getID(), and u.
|
private |
Definition at line 2982 of file game.cpp.
References achievements_tracker_ptr, diary::death_entry(), disp_NPC_epilogues(), display_faction_epilogues(), Messages::display_messages(), follower_ids, gamemode, avatar::get_avatar_diary(), get_kill_tracker(), show_scores_ui(), stats(), and u.
| void game::despawn_monster | ( | monster & | critter | ) |
Despawn a specific monster, it's stored on the overmap.
Also removes it from the creature tracker. Keep in mind that any monster index may point to a different monster after calling this (or to no monster at all).
Definition at line 12750 of file game.cpp.
References overmapbuffer::despawn_monster(), monster::is_hallucination(), monster::on_unload(), overmap_buffer, remove_zombie(), and monster::set_hp().
Referenced by place_player_overmap(), and shift_monsters().
| bool game::disable_robot | ( | const tripoint & | p | ) |
If there is a robot (that can be disabled), query the player and try to disable it.
Definition at line 10373 of file game.cpp.
References _, Character::assign_activity(), disable_activity_actor::can_disable_or_reprogram(), creature_tracker::creature_at(), effect_docile, get_creature_tracker, disable_activity_actor::get_disable_turns(), Creature::has_effect(), mtype::id, string_id< T >::is_empty(), mon_manhack, monster::name(), query_yn(), mtype::revert_to_itype, monster::type, u, and UILIST_CANCEL.
Referenced by examine().
|
private |
Definition at line 3612 of file game.cpp.
References overmapbuffer::find_npc(), follower_ids, FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, max(), catacurses::newwin(), overmap_buffer, point, scrollable_text(), TERMX, and TERMY.
Referenced by death_screen().
| void game::disp_NPCs | ( | ) |
Definition at line 3663 of file game.cpp.
References _, action, all_monsters(), c_white, FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, overmapbuffer::get_npcs_near_player(), Creature::global_omt_location(), input_context::handle_input(), m, mvwprintz(), map::name(), catacurses::newwin(), overmap_buffer, point, point_zero, Creature::pos(), ui_manager::redraw(), input_context::register_action(), TERMX, TERMY, coords::coord_point_base< Point >::to_string(), tripoint::to_string(), trait_NPC_STARTING_NPC, trait_NPC_STATIC_NPC, u, catacurses::werase(), and catacurses::wnoutrefresh().
|
private |
Definition at line 3629 of file game.cpp.
References faction_manager_ptr, FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, max(), catacurses::newwin(), point, scrollable_text(), TERMX, and TERMY.
Referenced by death_screen().
|
private |
Definition at line 12998 of file game.cpp.
References ACTION_DISPLAY_LIGHTING, uilist::addentry(), display_toggle_overlay(), g, MENU_AUTOASSIGN, uilist::query(), uilist::ret, use_tiles, and uilist::w_y_setup.
Referenced by do_regular_action(), and look_around().
|
static |
Definition at line 12879 of file game.cpp.
References _, inp_mngr, query_popup::on_top(), input_manager::pump_events(), ui_manager::redraw(), refresh_display(), and query_popup::wait_message().
| bool game::display_overlay_state | ( | action_id | action | ) |
Definition at line 12889 of file game.cpp.
References action, and displaying_overlays.
Referenced by display_toggle_overlay(), and display_visibility().
|
private |
Definition at line 13024 of file game.cpp.
References ACTION_DISPLAY_RADIATION, display_toggle_overlay(), and use_tiles.
Referenced by do_regular_action(), and look_around().
|
private |
Definition at line 12903 of file game.cpp.
References _, ACTION_DISPLAY_SCENT, add_msg(), display_toggle_overlay(), math_opers::div(), scent_map::draw(), g, inp_mngr, Creature::pos(), query_int(), ui_manager::redraw(), scent, u, use_tiles, Character::view_offset, w_terrain, and input_manager::wait_for_any_key().
Referenced by do_regular_action(), and look_around().
|
private |
Definition at line 12924 of file game.cpp.
References ACTION_DISPLAY_TEMPERATURE, display_toggle_overlay(), and use_tiles.
Referenced by do_regular_action(), and look_around().
| void game::display_toggle_overlay | ( | action_id | action | ) |
Definition at line 12894 of file game.cpp.
References action, display_overlay_state(), and displaying_overlays.
Referenced by display_lighting(), display_radiation(), display_scent(), display_temperature(), display_transparency(), display_vehicle_ai(), and display_visibility().
|
private |
Definition at line 13031 of file game.cpp.
References ACTION_DISPLAY_TRANSPARENCY, display_toggle_overlay(), and use_tiles.
Referenced by do_regular_action(), and look_around().
|
private |
Definition at line 12931 of file game.cpp.
References ACTION_DISPLAY_VEHICLE_AI, display_toggle_overlay(), and use_tiles.
Referenced by do_regular_action().
|
private |
Definition at line 12938 of file game.cpp.
References _, ACTION_DISPLAY_VISIBILITY, uilist::addentry(), uilist::callback, creature, creature_tracker::creature_at(), display_overlay_state(), display_toggle_overlay(), displaying_visibility_creature, g, get_creature_tracker, get_player_character, anonymous_namespace{overmap_location.cpp}::locations, MENU_AUTOASSIGN, num_creatures(), math_opers::pos(), uilist::query(), uilist::ret, use_tiles, and uilist::w_y_setup.
Referenced by do_regular_action().
|
private |
Definition at line 2111 of file handle_action.cpp.
References _, act, ACTION_ACTIONMENU, ACTION_ADVANCEDINV, ACTION_AUTOATTACK, ACTION_AUTONOTES, ACTION_AUTOPICKUP, ACTION_BIONICS, ACTION_BODYSTATUS, ACTION_BUTCHER, ACTION_CAST_SPELL, ACTION_CHAT, ACTION_CLOSE, ACTION_COLOR, ACTION_COMPARE, ACTION_CONSTRUCT, ACTION_CONTROL_VEHICLE, ACTION_CRAFT, ACTION_CYCLE_MOVE, ACTION_CYCLE_MOVE_REVERSE, ACTION_DEBUG, ACTION_DIARY, ACTION_DIR_DROP, ACTION_DISASSEMBLE, ACTION_DISPLAY_LIGHTING, ACTION_DISPLAY_RADIATION, ACTION_DISPLAY_SCENT, ACTION_DISPLAY_SCENT_TYPE, ACTION_DISPLAY_TEMPERATURE, ACTION_DISPLAY_TRANSPARENCY, ACTION_DISPLAY_VEHICLE_AI, ACTION_DISPLAY_VISIBILITY, ACTION_DISTRACTION_MANAGER, ACTION_DROP, ACTION_EAT, ACTION_EXAMINE, ACTION_EXAMINE_AND_PICKUP, ACTION_FACTIONS, ACTION_FIRE, ACTION_FIRE_BURST, ACTION_GRAB, ACTION_HAUL, ACTION_HAUL_TOGGLE, ACTION_HELP, ACTION_IGNORE_ENEMY, ACTION_INSERT_ITEM, ACTION_INVENTORY, ACTION_ITEMACTION, ACTION_KEYBINDINGS, ACTION_LIST_ITEMS, ACTION_LONGCRAFT, ACTION_LOOT, ACTION_MAIN_MENU, ACTION_MAP, ACTION_MEDICAL, ACTION_MEND, ACTION_MESSAGES, ACTION_MISSIONS, ACTION_MORALE, ACTION_MOVE_BACK, ACTION_MOVE_BACK_LEFT, ACTION_MOVE_BACK_RIGHT, ACTION_MOVE_DOWN, ACTION_MOVE_FORTH, ACTION_MOVE_FORTH_LEFT, ACTION_MOVE_FORTH_RIGHT, ACTION_MOVE_LEFT, ACTION_MOVE_RIGHT, ACTION_MOVE_UP, ACTION_MUTATIONS, ACTION_NULL, ACTION_OPEN, ACTION_OPEN_CONSUME, ACTION_OPEN_MOVEMENT, ACTION_OPTIONS, ACTION_ORGANIZE, ACTION_PAUSE, ACTION_PEEK, ACTION_PICK_STYLE, ACTION_PICKUP, ACTION_PICKUP_ALL, ACTION_PL_INFO, ACTION_QUICKLOAD, ACTION_QUICKSAVE, ACTION_READ, ACTION_RECRAFT, ACTION_RELOAD_ITEM, ACTION_RELOAD_TILESET, ACTION_RELOAD_WEAPON, ACTION_RELOAD_WIELDED, ACTION_RESET_MOVE, ACTION_SAFEMODE, ACTION_SAVE, ACTION_SELECT_DEFAULT_AMMO, ACTION_SELECT_FIRE_MODE, ACTION_SKY, ACTION_SLEEP, ACTION_SMASH, ACTION_SORT_ARMOR, ACTION_SUICIDE, ACTION_TAKE_OFF, ACTION_THROW, ACTION_TIMEOUT, ACTION_TOGGLE_AUTO_FEATURES, ACTION_TOGGLE_AUTO_FORAGING, ACTION_TOGGLE_AUTO_MINING, ACTION_TOGGLE_AUTO_PICKUP, ACTION_TOGGLE_AUTO_PULP_BUTCHER, ACTION_TOGGLE_AUTO_TRAVEL_MODE, ACTION_TOGGLE_AUTOSAFE, ACTION_TOGGLE_CROUCH, ACTION_TOGGLE_DEBUG_MODE, ACTION_TOGGLE_FULLSCREEN, ACTION_TOGGLE_HOUR_TIMER, ACTION_TOGGLE_PANEL_ADM, ACTION_TOGGLE_PIXEL_MINIMAP, ACTION_TOGGLE_PREVENT_OCCLUSION, ACTION_TOGGLE_PRONE, ACTION_TOGGLE_RUN, ACTION_TOGGLE_SAFEMODE, ACTION_TOGGLE_THIEF_MODE, ACTION_UNLOAD, ACTION_UNLOAD_CONTAINER, ACTION_USE, ACTION_USE_WIELDED, ACTION_WAIT, ACTION_WEAR, ACTION_WHITELIST_ENEMY, ACTION_WIELD, ACTION_WORKOUT, ACTION_WORLD_MODS, ACTION_ZONES, ACTION_ZOOM_IN, ACTION_ZOOM_OUT, actions_disabled_in_incorporeal, add_msg(), Character::add_msg_if_player(), safemode::add_rule(), all_colors, item::reload_option::ammo, Character::ammo_location, Creature::ANY, Character::assign_activity(), auto_travel_mode, avatar_action::autoattack(), bio_remote, butcher(), cast_spell(), chat(), check_safe_mode_allowed(), choose_adjacent(), Character::clear_destination(), climb_down(), close(), doors::close_door(), game_menus::inv::common(), game_menus::inv::compare(), construction_menu(), game_menus::inv::consume(), control_vehicle(), Character::controlling_vehicle, Character::craft(), create_advanced_inv(), avatar::cycle_move_mode(), avatar::cycle_move_mode_reverse(), debug_menu::debug(), destination_preview, Character::disassemble(), Character::dismount(), Character::disp_info(), avatar::disp_medical(), avatar::disp_morale(), ui::omap::display(), display_bodygraph(), help::display_help(), display_lighting(), Messages::display_messages(), display_radiation(), display_scent(), display_temperature(), display_transparency(), display_vehicle_ai(), display_visibility(), ui::omap::display_visible_weather(), drop_in_direction(), avatar_action::eat_here(), avatar_action::eat_or_use(), effect_incorporeal, effect_laserlocked, examine(), faction_manager_ptr, fire(), avatar_action::fire_wielded_weapon(), flag_RELOAD_AND_SHOOT, flag_RELOAD_ONE, rotatable_symbols::get(), get_actions_disabled_in_shell(), get_actions_disabled_mounted(), get_auto_notes_settings(), get_auto_pickup(), avatar::get_avatar_diary(), get_delta_from_movement_action(), get_distraction_manager(), get_help(), panel_manager::get_manager(), get_map, avatar::get_mon_visible(), Character::get_next_auto_move_direction(), options_manager::get_option(), get_option(), get_options(), Character::get_path_avoid(), Character::get_pathfinding_settings(), get_player_character, get_safemode(), get_timed_events, Creature::get_value(), Character::get_wielded_item(), grab(), item::gun_all_modes(), item::gun_cycle_mode(), item::gun_get_mode_id(), gun_mode_AUTO, item::gun_set_mode(), handbrake(), handle_debug_mode(), Character::has_active_bionic(), Character::has_active_item(), Character::has_active_mutation(), Creature::has_effect(), item::has_flag(), map::has_flag(), visitable::has_item(), Character::has_trait(), has_vehicle_control(), haul(), haul_toggle(), monster::ignoring, Character::in_vehicle, insert_item(), Character::is_auto_moving(), Character::is_blind(), item::is_gun(), item::is_gunmod(), Character::is_mounted(), map::is_outside(), MAP_SHARING::isCompetitive(), MAP_SHARING::isDebugger(), item_action_menu(), itype_radiocontrol, json_flag_MOP, list_items_monsters(), list_missions(), Character::long_craft(), loot(), m, m_info, m_warning, mark_main_ui_adaptor_resize(), Character::martial_arts_data, avatar_action::mend(), Creature::mod_moves(), mon_flag_RIDEABLE_MECH, map::mop_spills(), mostseen, Character::mounted_creature, avatar_action::move(), monster_visible_info::new_seen_mon, no, NUM_ACTIONS, one_in(), open(), open_consume_item_menu(), open_movement_mode_menu(), uistatedata::overmap_visible_weather, OVERRIDE_PLACE, Character::pause(), peek(), pickup(), pickup_all(), Character::place_corpse(), pldrive(), avatar_action::plthrow(), point_selection_menu(), point_zero, map::points_in_radius(), Creature::pos(), Creature::pos_bub(), avatar::power_bionics(), avatar::power_mutations(), query_yn(), quickload(), quicksave(), QUIT_SAVED, QUIT_SUICIDE, rcdrive(), read(), Character::recraft(), reload_item(), reload_tileset(), reload_weapon(), reload_wielded(), Creature::remove_effect(), avatar::reset_move_mode(), rl_dist(), map::route(), safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, SAFE_MODE_STOP, safe_mode_warning_logged, save(), options_manager::save(), SEEX, avatar::select_ammo(), Character::set_destination(), Creature::set_moves(), set_safe_mode(), Creature::set_value(), options_manager::cOpt::setNext(), auto_pickup::player_settings::show(), distraction_manager::distraction_manager_gui::show(), safemode::show(), options_manager::show(), panel_manager::show_adm(), diary::show_diary_ui(), auto_notes::auto_note_settings::show_gui(), sleep(), smash(), outfit::sort_armor(), game_menus::inv::swap_letters(), takeoff(), map::terrain_moppable(), TFLAG_GOES_DOWN, TFLAG_NO_FLOOR, item::tname(), avatar::toggle_crouch_mode(), toggle_debug_hour_timer(), toggle_fullscreen(), toggle_pixel_minimap(), avatar::toggle_prone_mode(), avatar::toggle_run_mode(), trait_PROF_CHURL, trait_SHELL2, trait_SHELL3, trait_WAYFARER, tripoint_above, tripoint_below, turnssincelastmon, u, uistate, avatar_action::unload(), unload_container(), uquit, avatar_action::use_item(), Character::use_wielded(), options_manager::cOpt::value_as(), map::veh_at(), vertical_move(), wait(), wear(), WHITELISTED, wield(), world_generator, Character::worn, yes, zones_manager(), zoom_in(), and zoom_out().
Referenced by handle_action().
| void game::draw | ( | ui_adaptor & | ui | ) |
Definition at line 3969 of file game.cpp.
References blink_active_phase, map::build_map_cache(), draw_async_anim_curses(), draw_blink_curses(), draw_callbacks, draw_panels(), draw_ter(), m, Creature::pos(), POSX, POSY, ter_view_p, test_mode, u, map::update_visibility_cache(), Character::view_offset, void_blink_curses(), w_terrain, catacurses::werase(), catacurses::wnoutrefresh(), tripoint::xy(), and tripoint::z.
| void game::draw_async_anim | ( | const tripoint & | p, |
| const std::string & | tile_id, | ||
| const std::string & | ncstr = "", |
||
| const nc_color & | nccol = c_black |
||
| ) |
| void game::draw_async_anim_curses | ( | ) |
Definition at line 3919 of file game.cpp.
References async_anim_layer_curses, mvwprintz(), Creature::posx(), POSX, Creature::posy(), POSY, Creature::posz(), tripoint, u, Character::view_offset, w_terrain, and tripoint::xy().
Referenced by draw().
| void game::draw_below_override | ( | const tripoint & | p, |
| bool | draw | ||
| ) |
Definition at line 1019 of file animation.cpp.
| void game::draw_blink_curses | ( | ) |
Definition at line 3945 of file game.cpp.
References blink_layer_curses, mvwprintz(), Creature::posx(), POSX, Creature::posy(), POSY, Creature::posz(), tripoint, u, Character::view_offset, w_terrain, and tripoint::xy().
Referenced by draw().
| void game::draw_bullet | ( | const tripoint & | t, |
| int | i, | ||
| const std::vector< tripoint > & | trajectory, | ||
| char | bullet | ||
| ) |
Definition at line 520 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_bullet_curses(), and m.
Definition at line 4087 of file game.cpp.
References c_green_cyan, c_red, center, debug_mode, Creature::draw(), init_draw_blink_curses(), is_valid_in_w_terrain(), m, mvwputch(), point, Creature::pos(), Creature::posx(), POSX, Creature::posy(), POSY, Creature::posz(), Character::sees(), Character::sees_with_infrared(), Character::sees_with_specials(), tripoint, tripoint_above, tripoint_below, u, map::valid_move(), w_terrain, and tripoint::xy().
Referenced by draw_ter().
| void game::draw_cursor | ( | const tripoint & | p | ) | const |
Definition at line 742 of file animation.cpp.
References c_light_green, mvwputch_inv(), anonymous_namespace{animation.cpp}::relative_view_pos(), w_terrain, and tripoint::xy().
Referenced by draw_look_around_cursor().
| void game::draw_field_override | ( | const tripoint & | p, |
| const field_type_id & | id | ||
| ) |
Definition at line 975 of file animation.cpp.
Definition at line 936 of file animation.cpp.
| void game::draw_graffiti_override | ( | const tripoint & | p, |
| bool | has | ||
| ) |
Definition at line 949 of file animation.cpp.
| void game::draw_highlight | ( | const tripoint & | p | ) |
Definition at line 755 of file animation.cpp.
Definition at line 583 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_hit_mon_curses(), m, and u.
| void game::draw_hit_player | ( | const Character & | p, |
| int | dam | ||
| ) |
Definition at line 628 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_hit_player_curses().
| void game::draw_item_override | ( | const tripoint & | p, |
| const itype_id & | id, | ||
| const mtype_id & | mid, | ||
| bool | hilite | ||
| ) |
Definition at line 989 of file animation.cpp.
Definition at line 728 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_line_curses().
| void game::draw_line | ( | const tripoint & | p, |
| const tripoint & | center_point, | ||
| const std::vector< tripoint > & | points, | ||
| bool | noreveal = false |
||
| ) |
Definition at line 683 of file animation.cpp.
References center, anonymous_namespace{animation.cpp}::draw_line_curses(), Character::sees(), and u.
Referenced by draw_line(), and draw_ter().
| void game::draw_line | ( | const tripoint_bub_ms & | p, |
| const tripoint_bub_ms & | center_point, | ||
| const std::vector< tripoint_bub_ms > & | points, | ||
| bool | noreveal = false |
||
| ) |
Definition at line 694 of file animation.cpp.
References center, draw_line(), and coords::coord_point_mut< Point, Subpoint, InBounds >::raw().
| void game::draw_look_around_cursor | ( | const tripoint & | lp, |
| const visibility_variables & | cache | ||
| ) |
Definition at line 6418 of file game.cpp.
References map::apparent_light_at(), BOOMER, BOOMER_DARK, c_dark_gray, c_light_gray, c_pink, c_white, center, CLEAR, creature, creature_tracker::creature_at(), DARK, draw_cursor(), map::drawsq(), get_creature_tracker, map::get_visibility(), HIDDEN, map::inbounds(), is_draw_tiles_mode(), live_view::is_enabled(), LIT, liveview, m, mvwputch(), point, Creature::pos(), POSX, POSY, Character::sees(), u, Character::view_offset, w_terrain, and tripoint::xy().
Referenced by look_around().
|
private |
Definition at line 4190 of file game.cpp.
References arrow, c_black, c_blue, c_brown, c_cyan, c_dark_gray, c_green, c_light_blue, c_light_cyan, c_light_gray, c_light_green, c_light_red, c_magenta, c_pink, c_red, c_white, c_yellow, draw_border(), units::fabs(), g, map::get_abs_sub(), avatar::get_active_mission_target(), oter_t::get_color(), overmapbuffer::get_horde_size(), get_player_character, oter_t::get_symbol(), overmapbuffer::get_vehicle_ter_sym(), Creature::global_omt_location(), overmapbuffer::has_note(), overmapbuffer::has_vehicle(), HORDE_VISIBILITY_SIZE, overmap::invalid_tripoint, overmapbuffer::is_explored(), m, mvwputch(), mvwputch_hi(), overmapbuffer::note(), coords::om, overmap_buffer, Character::overmap_los(), Character::overmap_sight_range(), point, point_north_west, Creature::posz(), red_background(), overmapbuffer::seen(), overmapbuffer::ter(), u, w_minimap, catacurses::werase(), catacurses::wnoutrefresh(), coords::coord_point_mut< Point, Subpoint, InBounds >::x(), coords::coord_point< Point, Origin, Scale, InBounds >::xy(), coords::coord_point_mut< Point, Subpoint, InBounds >::y(), and coords::coord_point_mut< Point, Subpoint, InBounds >::z().
| void game::draw_monster_override | ( | const tripoint & | p, |
| const mtype_id & | id, | ||
| int | count, | ||
| bool | more, | ||
| Creature::Attitude | att | ||
| ) |
Definition at line 1033 of file animation.cpp.
| void game::draw_panels | ( | bool | force_draw = false | ) |
Definition at line 4007 of file game.cpp.
References c_light_red, panel_manager::get_current_layout(), panel_manager::get_manager(), LINE_OXOX, LINE_OXXX, LINE_XOOX, LINE_XOXO, LINE_XXOO, max(), min(), mvwprintz(), mvwputch(), catacurses::newwin(), panel_layout::panels(), point, point_zero, show_panel_adm, TERMX, TERMY, calendar::turn, calendar::turn_zero, u, utf8_width(), catacurses::werase(), and catacurses::wnoutrefresh().
Referenced by draw().
| void game::draw_pixel_minimap | ( | const catacurses::window & | w | ) |
Definition at line 4082 of file game.cpp.
References w_pixel_minimap.
| void game::draw_radiation_override | ( | const tripoint & | p, |
| int | rad | ||
| ) |
Definition at line 910 of file animation.cpp.
| void game::draw_sct | ( | ) | const |
Definition at line 824 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_sct_curses().
Referenced by get_player_input().
| void game::draw_ter | ( | bool | draw_sounds = true | ) |
Definition at line 4130 of file game.cpp.
References is_looking, Creature::pos(), u, and Character::view_offset.
Referenced by draw().
| void game::draw_ter | ( | const tripoint & | center, |
| bool | looking = false, |
||
| bool | draw_sounds = true |
||
| ) |
Definition at line 4136 of file game.cpp.
References all_creatures(), c_white, center, Character::controlling_vehicle, destination_preview, map::draw(), draw_critter(), draw_footsteps(), draw_line(), draw_veh_dir_indicator(), m, mvwputch(), Creature::pos_bub(), Creature::posx(), POSX, Creature::posy(), POSY, ter_view_p, tripoint, u, Character::view_offset, w_terrain, coords::coord_point< Point, Origin, Scale, InBounds >::xy(), tripoint::xy(), and tripoint::z.
Definition at line 923 of file animation.cpp.
| void game::draw_trail_to_square | ( | const tripoint & | t, |
| bool | bDrawX | ||
| ) |
Definition at line 8096 of file game.cpp.
References draw_trail(), Creature::pos(), and u.
Definition at line 962 of file animation.cpp.
| void game::draw_veh_dir_indicator | ( | bool | next | ) |
Definition at line 4182 of file game.cpp.
References c_dark_gray, c_white, get_veh_dir_indicator_location(), mvwputch(), POSX, POSY, u, Character::view_offset, w_terrain, and tripoint::xy().
Referenced by draw_ter().
| void game::draw_vpart_override | ( | const tripoint & | p, |
| const vpart_id & | id, | ||
| int | part_mod, | ||
| const units::angle & | veh_dir, | ||
| bool | hilite, | ||
| const point & | mount | ||
| ) |
Definition at line 1005 of file animation.cpp.
| void game::draw_weather | ( | const weather_printable & | wPrint | ) | const |
Definition at line 782 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_weather_curses(), and w_terrain.
Referenced by get_player_input().
| void game::draw_zones | ( | const tripoint & | start, |
| const tripoint & | end, | ||
| const tripoint & | offset | ||
| ) | const |
Definition at line 859 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_zones_curses(), keycode::end, and w_terrain.
|
private |
Definition at line 9336 of file game.cpp.
References Character::drop(), game_menus::inv::multidrop(), and u.
Referenced by do_regular_action().
|
private |
Definition at line 3422 of file game.cpp.
References event_bus_ptr.
Referenced by game(), is_game_over(), load(), and save().
| void game::exam_appliance | ( | vehicle & | veh, |
| const point & | cp = point_zero |
||
| ) |
open appliance interaction screen
Definition at line 5649 of file game.cpp.
References act, Character::assign_activity(), c, veh_app_interact::run(), Creature::set_moves(), and u.
| void game::exam_vehicle | ( | vehicle & | veh, |
| const point & | cp = point_zero |
||
| ) |
open vehicle interaction screen
Definition at line 5658 of file game.cpp.
References _, act, add_msg(), Character::assign_activity(), c, m_info, vehicle::magic, vehicle::name, veh_interact::run(), Creature::set_moves(), and u.
|
private |
Definition at line 6090 of file game.cpp.
References _, ACTION_EXAMINE, ACTION_EXAMINE_AND_PICKUP, choose_adjacent_highlight(), examine(), m, Character::manual_examine, Creature::pos(), u, and map::veh_at().
|
private |
Definition at line 6188 of file game.cpp.
References _, add_msg(), monster::attitude_to(), c, map_data_common_t::can_examine(), Character::cant_do_mounted(), mtype::chat_topics, creature_tracker::creature_at(), disable_robot(), effect_pet, item_stack::empty(), map_data_common_t::examine(), trap::examine(), iexamine::fireplace(), Creature::FRIENDLY, map::furn(), g, get_avatar, get_creature_tracker, get_fire_fuel_string(), monster::get_name(), get_talker_for(), Creature::has_effect(), map_data_common_t::has_examine(), monster::has_flag(), map::has_flag(), map::has_furn(), map::has_items(), map::i_at(), Character::is_mounted(), trap::is_null(), m, m_warning, monexamine::mech_hack(), monexamine::mfriend_menu(), mon_flag_CONVERSATION, mon_flag_PAY_BOT, mon_flag_RIDEABLE_MECH, Character::mounted_creature, map::name(), none, npc_menu(), int_id< T >::obj(), map::only_liquid_in_liquidcont(), iexamine::part_con(), monexamine::pay_bot(), monexamine::pet_menu(), pickup(), Creature::pos(), sounds::process_sound_markers(), avatar::talk_to(), map::ter(), TFLAG_CONSOLE, TFLAG_CONTAINER, TFLAG_FIRE_CONTAINER, TFLAG_NO_PICKUP_ON_EXAMINE, TFLAG_SEALED, TFLAG_UNSTABLE, map::tr_at(), monster::type, u, use_computer(), map::veh_at(), and iexamine::workbench().
Referenced by do_regular_action(), and examine().
| void game::extended_description | ( | const tripoint & | p | ) |
Long description of (visible) things at tile.
Definition at line 49 of file descriptions.cpp.
References _, action, arrow, c_light_gray, c_white, creature, enumerate_as_string(), map_data_common_t::extended_description(), optional_vpart_position::extended_description(), Creature::extended_description(), fold_and_print_from(), map::furn(), furniture, input_context::get_desc(), get_map, map::get_signage(), input_context::handle_input(), map::has_furn(), Character::has_trait(), left, LINE_OXOX, m, mvwprintz(), mvwputch(), catacurses::newwin(), point, point_zero, ui_manager::redraw(), input_context::register_action(), right, seen_critter(), Character::sees(), ter_t::src, furn_t::src, string_format(), map::ter(), TERMX, TERMY, terrain, trait_ILLITERATE, u, map::veh_at(), vehicle, catacurses::werase(), and catacurses::wnoutrefresh().
Referenced by look_around().
|
private |
Definition at line 8035 of file game.cpp.
References add_item_recursive(), closest_points_first(), map::i_at(), Character::is_blind(), m, Creature::pos(), Creature::posy(), cata::hash64_detail::ret, Character::sees(), map::sees_some_items(), and u.
Referenced by list_items_monsters().
| bool game::find_nearby_spawn_point | ( | const tripoint & | target, |
| const mtype_id & | mt, | ||
| int | min_radius, | ||
| int | max_radius, | ||
| tripoint & | point, | ||
| bool | outdoor_only, | ||
| bool | indoor_only, | ||
| bool | open_air_allowed = false |
||
| ) |
Finds somewhere to spawn a monster or npc.
Definition at line 5295 of file game.cpp.
References can_place_monster(), get_map, mtype::id, rl_dist(), rng(), and tripoint.
| bool game::find_nearby_spawn_point | ( | const tripoint & | target, |
| int | min_radius, | ||
| int | max_radius, | ||
| tripoint & | point, | ||
| bool | outdoor_only, | ||
| bool | indoor_only, | ||
| bool | open_air_allowed = false |
||
| ) |
| npc * game::find_npc | ( | character_id | id | ) |
Find the npc with the given ID.
Returns NULL if the npc could not be found. Searches all loaded overmaps.
Definition at line 1715 of file game.cpp.
References overmapbuffer::find_npc(), and overmap_buffer.
Referenced by critter_by_id().
| npc * game::find_npc_by_unique_id | ( | const std::string & | unique_id | ) |
Find the npc with the given unique ID.
Returns NULL if the npc could not be found. Searches all loaded overmaps.
Definition at line 1720 of file game.cpp.
References overmapbuffer::find_npc_by_unique_id(), and overmap_buffer.
| std::optional< tripoint > game::find_or_make_stairs | ( | map & | mp, |
| int | z_after, | ||
| bool & | rope_ladder, | ||
| bool | peeking, | ||
| const tripoint & | pos | ||
| ) |
Returns the other end of the stairs (if any).
May query, affect u etc.
| pos | Disable queries and msgs if not the same position as player. |
Definition at line 12386 of file game.cpp.
References _, add_msg(), Character::apply_damage(), real_coords::begin_om_pos(), creature_tracker::creature_at(), effect_gliding, monster::friendly, get_creature_tracker, get_map, monster::get_name(), Character::get_skill_level(), map::getabs(), map::getlocal(), visitable::has_amount(), Creature::has_effect(), Character::has_flag(), map::has_flag(), Character::has_trait(), map::impassable(), npc::is_enemy(), itype_grapnel, itype_rope_30, json_flag_WEB_RAPPEL, m_bad, Character::mod_pain(), Character::mod_stored_kcal(), Character::mod_thirst(), point, map::points_in_rectangle(), popup(), Creature::pos(), math_opers::pos(), query_yn(), rl_dist(), rng(), SEEX, skill_dodge, string_format(), map::ter(), ter_t_elevator, ter_t_lava, ter_t_manhole_cover, TFLAG_GOES_DOWN, TFLAG_GOES_UP, tr_ledge, trait_VINES2, trait_VINES3, tripoint_above, tripoint_below, u, and Character::use_amount().
Referenced by vertical_move().
| bool game::fling_creature | ( | Creature * | c, |
| const units::angle & | dir, | ||
| float | flvel, | ||
| bool | controlled = false, |
||
| bool | intentional = false |
||
| ) |
Flings the input creature in the given direction.
intentional is true for activities you wouldn't consider immunity for
Definition at line 11735 of file game.cpp.
References _, add_msg(), tileray::advance(), monster::apply_damage(), map::bash(), map::bash_strength(), c, Character::calculate_by_enchantment(), Creature::check_dead_state(), creature_tracker::creature_at(), map::creature_on_trap(), damage_bash, debugmsg, tileray::dx(), tileray::dy(), force, monster::get_armor_type(), get_creature_tracker, map::has_flag(), mtype::hp, map::impassable(), Character::in_vehicle, inp_mngr, invalidate_main_ui_adaptor(), map::is_bashable(), monster::is_dead(), json_flag_GRAB, enchant_vals::KNOCKBACK_RESIST, m, m_warning, max(), optional_vpart_position::obstacle_at_part(), map::passable(), Creature::pos(), input_manager::pump_events(), ui_manager::redraw_invalidated(), refresh_display(), rng(), Character::sees(), Creature::setpos(), TFLAG_SWIMMABLE, map::tr_at(), tr_ledge, monster::type, u, map::unboard_vehicle(), update_map(), map::veh_at(), water_affect_items(), tripoint::x, x_in_y(), and tripoint::y.
Referenced by moving_vehicle_dismount().
Definition at line 5671 of file game.cpp.
References _, Character::activity, map::add_item_or_charges(), add_msg(), monster::apply_damage(), item_stack::begin(), Character::cancel_activity(), Creature::check_dead_state(), creature_tracker::creature_at(), monster::die_in_explosion(), item_stack::end(), map_stack::erase(), g, get_creature_tracker, Character::get_name(), map::has_flag(), Character::hitall(), huge, map::i_at(), Creature::is_avatar(), monster::is_dead(), Character::is_npc(), knockback(), LIQUID, m, m_bad, m_warning, material_glass, max(), map_data_common_t::name(), monster::name(), int_id< T >::obj(), point, map::points_in_radius(), math_opers::pos(), random_point(), rng_float(), Character::sees(), mtype::size, small, map::ter_set(), TFLAG_NOITEM, tripoint, monster::type, u, map::veh_at(), point::x, tripoint::x, point::y, tripoint::y, and tripoint::z.
Referenced by forced_door_closing().
| bool game::forced_door_closing | ( | const tripoint_bub_ms & | p, |
| const ter_id & | door_type, | ||
| int | bash_dmg | ||
| ) |
Definition at line 5796 of file game.cpp.
References forced_door_closing(), and coords::coord_point_mut< Point, Subpoint, InBounds >::raw().
| special_game_type game::gametype | ( | ) | const |
| std::vector< Character * > game::get_characters_if | ( | const std::function< bool(const Character &)> & | pred | ) |
Returns a creature matching a predicate.
Only living (not dead) creatures are checked. Returns nullptr if no creature matches the predicate. There is no guarantee which creature is returned when several creatures match.
Definition at line 13238 of file game.cpp.
References all_creatures().
| std::vector< Creature * > game::get_creatures_if | ( | const std::function< bool(const Creature &)> & | pred | ) |
Returns all creatures matching a predicate.
Only living ( not dead ) creatures are checked ( and returned ). Returned pointers are never null.
Definition at line 13130 of file game.cpp.
References all_creatures().
Referenced by chat().
| overmap & game::get_cur_om | ( | ) | const |
The overmap which contains the center submap of the reality bubble.
Definition at line 13111 of file game.cpp.
References overmapbuffer::get(), map::get_abs_sub(), HALF_MAPSIZE, m, overmap_buffer, coords::sm, tripoint, and coords::coord_point< Point, Origin, Scale, InBounds >::xy().
Referenced by start_game().
| std::vector< std::string > game::get_dangerous_tile | ( | const tripoint & | dest_loc | ) | const |
Definition at line 10433 of file game.cpp.
References body_part_arm_l, body_part_arm_r, body_part_eyes, body_part_foot_l, body_part_foot_r, body_part_hand_l, body_part_hand_r, body_part_head, body_part_leg_l, body_part_leg_r, body_part_mouth, body_part_torso, bp, trap::can_see(), Character::check_immunity_data(), damage_bash, damage_cut, Character::dex_cur, map::field_at(), field::find_field(), Character::get_armor_type(), Creature::has_effect_with_flag(), map::has_flag(), Character::immune_to(), Character::in_vehicle, trap::is_benign(), Character::is_blind(), Creature::is_dangerous_field(), Character::is_immune_effect(), Character::is_mounted(), json_flag_LEVITATION, m, Character::mounted_creature, trap::name(), map::name(), optional_vpart_position::part_with_feature(), Creature::pos(), TFLAG_ROUGH, TFLAG_SHARP, map::tr_at(), tr_ledge, u, and map::veh_at().
Referenced by grabbed_furn_move(), is_dangerous_tile(), prompt_dangerous_tile(), and walk_move().
| std::unordered_set< tripoint > game::get_fishable_locations | ( | int | distance, |
| const tripoint & | fish_pos | ||
| ) |
Get the contiguous fishable locations starting at fish_pos, out to the specified distance.
| distance | Distance around the fish_pos to examine for contiguous fishable locations. |
| fish_pos | The location being fished. |
Definition at line 4521 of file game.cpp.
References inclusive_cuboid< Tripoint, >::contains(), map::has_flag(), m, point, point_east, point_north, point_south, point_west, and TFLAG_FISHABLE.
| std::vector< monster * > game::get_fishable_monsters | ( | std::unordered_set< tripoint > & | fishable_locations | ) |
Get the fishable monsters within the provided fishable locations.
| fishable_locations | A set of locations which are valid fishable terrain. Any fishable monsters are filtered by this collection to determine those which can actually be caught. |
Definition at line 4578 of file game.cpp.
References all_monsters(), and mon_flag_FISHABLE.
| std::set< character_id > game::get_follower_list | ( | ) |
| const kill_tracker & game::get_kill_tracker | ( | ) | const |
Definition at line 1272 of file game.cpp.
References kill_tracker_ptr.
Referenced by death_screen().
| int game::get_moves_since_last_save | ( | ) | const |
Definition at line 13158 of file game.cpp.
References all_npcs().
Referenced by allies(), chat(), and validate_npc_followers().
|
private |
Definition at line 236 of file handle_action.cpp.
References _, action, ACTION_CENTER, action_ident(), ACTION_KEYBINDINGS, ACTION_LOOK, ACTION_SHIFT_E, ACTION_SHIFT_N, ACTION_SHIFT_NE, ACTION_SHIFT_NW, ACTION_SHIFT_S, ACTION_SHIFT_SE, ACTION_SHIFT_SW, ACTION_SHIFT_W, ACTION_TOGGLE_MAP_MEMORY, add_draw_callback(), scrollingcombattext::advanceAllSteps(), user_turn::async_anim_timeout(), user_turn::blink_timeout(), c_red, weather_printable::cGlyph, CLEAR, weather_printable::colGlyph, weather_animation_t::color, creature_tracker::creature_at(), draw_sct(), draw_weather(), weather_animation_t::factor, fullscreen, g, map::get_cache_ref(), get_creature_tracker, get_default_mode_input_context(), input_context::get_desc(), get_map, map::get_visibility(), map::get_visibility_variables_cache(), catacurses::getmaxx(), catacurses::getmaxy(), handle_mouseview(), user_turn::has_timeout_elapsed(), map::inbounds(), invalidate_main_ui_adaptor(), map::is_outside(), keycode, m, map, MAPSIZE_X, MAPSIZE_Y, MAX_VIEW_DISTANCE, NULL_UNICODE, pixel_minimap_option, Creature::posx(), Creature::posy(), Creature::posz(), QUIT_WATCH, ui_manager::redraw_invalidated(), input_context::register_action(), input_context::reset_timeout(), rng(), SCT, Character::sees(), input_context::set_iso(), input_context::set_timeout(), weather_animation_t::symbol, TERMX, TERMY, TERRAIN_WINDOW_HEIGHT, TERRAIN_WINDOW_WIDTH, to_translation(), u, map::update_visibility_cache(), uquit, utf8_width(), weather_printable::vdrops, Character::view_offset, level_cache::visibility_cache, scrollingcombattext::vSCT, w_terrain, weather, weather_type::weather_animation, weather_manager::weather_id, weather_printable::wtype, point::x, tripoint::x, tripoint::xy(), point::y, and tripoint::y.
Referenced by handle_action().
| unsigned int game::get_seed | ( | ) | const |
Definition at line 1592 of file game.cpp.
References seed.
| point_abs_om game::get_unique_npc_location | ( | const std::string & | id | ) |
Definition at line 3447 of file game.cpp.
References debugmsg, base_camps::id, unique_npc_exists(), and unique_npcs.
| int game::get_user_action_counter | ( | ) | const |
| std::optional< tripoint > game::get_veh_dir_indicator_location | ( | bool | next | ) | const |
Returns the location where the indicator should go relative to the reality bubble, or nothing to indicate no indicator should be drawn.
Based on the vehicle the player is driving, if any.
| next | If true, bases it on the vehicle the vehicle will turn to next turn, instead of the one it is currently facing. |
Definition at line 4167 of file game.cpp.
References vehicle::dir_vec(), vehicle::face_vec(), m, Creature::pos(), tripoint, u, map::veh_at(), rl_vec2d::x, rl_vec2d::y, and tripoint::z.
Referenced by draw_veh_dir_indicator().
| int game::get_zoom | ( | ) | const |
Definition at line 8215 of file game.cpp.
References DEFAULT_TILESET_ZOOM, and tileset_zoom.
Referenced by look_around().
| bool game::grabbed_furn_move | ( | const tripoint & | dp | ) |
Definition at line 11441 of file game.cpp.
References _, abs(), add_msg(), item_stack::begin(), can_move_furniture(), map::drop_furniture(), item_stack::end(), enumerate_as_string(), fd_fire, map::furn(), map::furn_set(), Character::get_arm_str(), get_dangerous_tile(), map::get_field_age(), map::get_field_intensity(), Character::get_perceived_pain(), avatar::grab(), Character::grab_point, map_data_common_t::has_flag(), map::has_flag(), map::has_floor_or_water(), map::has_furn(), Character::has_trait(), map::i_at(), map::i_clear(), map::impassable(), map_stack::insert(), m, m_bad, m_info, max(), Character::mod_pain(), furn_t::move_str_req, sounds::movement, map_data_common_t::name(), NONE, string_id< furn_t >::NULL_ID(), int_id< T >::obj(), one_in(), Creature::pos(), map::remove_field(), map::set_field_age(), map::set_field_intensity(), item_stack::size(), sounds::sound(), temp, map::tername(), TFLAG_CONTAINER, TFLAG_DESTROY_ITEM, TFLAG_FIRE_CONTAINER, TFLAG_FLAT, TFLAG_NOITEM, TFLAG_RAMP_DOWN, TFLAG_RAMP_UP, TFLAG_SEALED, TFLAG_SWIMMABLE, trait_CENOBITE, trait_MASOCHIST, trait_MASOCHIST_MED, tripoint, u, tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
| int game::grabbed_furn_move_time | ( | const tripoint & | dp | ) |
Definition at line 11375 of file game.cpp.
References item_stack::begin(), can_move_furniture(), item_stack::end(), Character::exertion_adjusted_move_multiplier(), map::furn(), Character::get_arm_str(), Character::grab_point, map_data_common_t::has_flag(), map::has_flag(), map::has_furn(), map::i_at(), m, max(), furn_t::move_str_req, int_id< T >::obj(), one_in(), Creature::pos(), item_stack::size(), TFLAG_CONTAINER, TFLAG_DESTROY_ITEM, TFLAG_FIRE_CONTAINER, TFLAG_NOITEM, TFLAG_SEALED, TFLAG_SWIMMABLE, tripoint, u, and tripoint::xy().
|
private |
Check for dangerous stuff at dest_loc, return false if the player decides not to step there.
Definition at line 11632 of file game.cpp.
References _, add_msg(), Character::assign_activity(), FURNITURE, avatar::get_grab_type(), avatar::grab(), Character::grab_point, grabbed_veh_move(), m_info, NONE, u, VEHICLE, tripoint::x, tripoint::y, and tripoint::z.
Referenced by walk_move().
|
private |
\ARM_STR determines ability to drag vehicles
Strength increases speed of dragging vehicles Strength decreases stamina cost of dragging vehiclesDefinition at line 19 of file grab.cpp.
References _, abs(), add_msg(), Character::burn_energy_all(), vehicle::check_falling_or_floating(), vehicle::collision(), debugmsg, dice(), tileray::dir(), vehicle::disp_name(), map::displace_vehicle(), map::drop_vehicle(), vehicle::face, failed, Character::get_arm_str(), get_avatar, vehicle::get_harnessed_animal(), get_map, vehicle::global_part_pos3(), vehicle::global_pos3(), avatar::grab(), Character::grab_point, vehicle::handle_potential_theft(), vehicle::handle_trap(), tileray::init(), vehicle::invalidate_mass(), vehicle::is_falling, vehicle::is_on_ramp, vehicle::k_traction(), map::level_vehicle(), m, m_bad, m_info, max(), min(), Creature::mod_moves(), Character::mod_pain(), map::move_cost(), sounds::movement, vehicle::name, NONE, normalize(), one_in(), vehicle::part(), vehicle::pivot_displacement(), vehicle::pivot_point(), Creature::pos(), vehicle::pos, vehicle::pos_bub(), vehicle_part::precalc, vehicle::precalc_mounts(), map::rebuild_vehicle_level_caches(), Creature::setpos(), sounds::sound(), vehicle::total_mass(), tripoint, tripoint_zero, calendar::turn, vehicle::turn(), vehicle::turn_dir, u, vehicle::valid_wheel_config(), map::veh_at(), veh_pointer_or_null(), map::vehicle_wheel_traction(), vehicle::wheelcache, tripoint::x, tripoint::xy(), and tripoint::y.
Referenced by grabbed_move().
|
private |
Definition at line 2979 of file handle_action.cpp.
References _, act, action, ACTION_ACTIONMENU, ACTION_CLICK_AND_DRAG, action_ident(), ACTION_KEYBINDINGS, ACTION_MAIN_MENU, ACTION_NULL, ACTION_SEC_SELECT, ACTION_SELECT, ACTION_TIMEOUT, add_msg(), can_action_change_worldstate(), Character::clear_destination(), D_INFO, dbg, destination_preview, input_context::display_menu(), do_deathcam_action(), do_regular_action(), g, gamemode, get_avatar, input_context::get_coordinates(), input_event::get_first_input(), Creature::get_moves(), Character::get_next_auto_move_direction(), get_player_input(), input_context::get_raw_input(), handle_action_menu(), handle_key_blocking_activity(), handle_main_menu(), Character::has_destination(), Character::has_destination_activity(), has_vehicle_control(), Character::is_dead_state(), input_event::long_description(), look_up_action(), m_info, Creature::mod_moves(), avatar::movecounter, user_turn::moves_elapsed(), press_x_if_bound(), QUIT_DIED, QUIT_WATCH, Character::sees(), input_event::sequence, Character::start_destination_activity(), string_format(), ter_view_p, try_get_left_click_action(), try_get_right_click_action(), calendar::turn, uquit, user_action_counter, w_terrain, and tripoint::xy().
|
private |
Definition at line 2355 of file game.cpp.
References action, input_context::get_coordinates(), input_context::handle_input(), live_view::hide(), liveview, ui_manager::redraw(), live_view::show(), ter_view_p, w_terrain, and tripoint::xy().
Referenced by get_player_input().
| bool game::has_blink_curses | ( | ) |
Definition at line 3964 of file game.cpp.
References blink_layer_curses.
| bool game::has_gametype | ( | ) | const |
|
private |
Definition at line 13038 of file game.cpp.
References last_save_timestamp, and moves_since_last_save.
Referenced by load(), and start_game().
| void game::init_draw_async_anim_curses | ( | const tripoint & | p, |
| const std::string & | ncstr, | ||
| const nc_color & | nccol | ||
| ) |
| void game::init_draw_blink_curses | ( | const tripoint & | p, |
| const std::string & | ncstr, | ||
| const nc_color & | nccol | ||
| ) |
Definition at line 3938 of file game.cpp.
References blink_layer_curses.
Referenced by draw_critter().
| void game::insert_item | ( | ) |
Definition at line 9315 of file game.cpp.
References _, add_msg(), good, game_menus::inv::insert_items(), inv_map_splice(), item::is_container(), item::is_corpse(), rate_action_insert(), and u.
Referenced by do_regular_action().
| void game::insert_item | ( | drop_locations & | targets | ) |
Definition at line 9293 of file game.cpp.
References _, add_msg(), Character::assign_activity(), good, inv_map_splice(), item::is_container(), item::is_corpse(), rate_action_insert(), string_format(), music::title, and u.
| item_location game::inv_map_splice | ( | const item_filter & | filter, |
| const std::string & | title, | ||
| int | radius = 0, |
||
| const std::string & | none_message = "" |
||
| ) |
Custom-filtered menu for inventory and nearby items and those that within specified radius.
Definition at line 455 of file game_inventory.cpp.
References convert_filter(), filter, inv_internal(), music::title, and u.
Referenced by insert_item(), and reload_item().
| item_location game::inv_map_splice | ( | const item_location_filter & | filter, |
| const std::string & | title, | ||
| int | radius = 0, |
||
| const std::string & | none_message = "" |
||
| ) |
Definition at line 462 of file game_inventory.cpp.
References filter, inv_internal(), music::title, and u.
| void game::invalidate_main_ui_adaptor | ( | ) | const |
Definition at line 3798 of file game.cpp.
References main_ui_adaptor.
Referenced by add_draw_callback(), fling_creature(), get_player_input(), list_items(), list_monsters(), look_around(), and zones_manager().
| int game::inventory_item_menu | ( | item_location | locThisItem, |
| const std::function< int()> & | startx = []() { return 0; }, |
||
| const std::function< int()> & | width = []() { return 50; }, |
||
| inventory_item_menu_position | position = RIGHT_OF_INFO |
||
| ) |
Definition at line 2035 of file game.cpp.
References _, ACT_VIEW_RECIPE, add_msg(), auto_pickup::player_settings::add_rule(), uilist::addentry(), uilist::additional_actions, uilist::allow_anykey, Character::assign_activity(), BORDER_COLOR, uilist::border_color, c_light_gray, c_light_green, c_light_red, ret_val_common::c_str(), Character::can_wield(), cant, Character::change_side(), game_menus::inv::common(), game_menus::inv::consume(), debugmsg, Character::disassemble(), draw_item_info(), Character::drop(), avatar_action::eat(), avatar_action::eat_or_use(), uilist::entries, item::favorite_settings_menu(), uilist::filtering, flag_NO_UNWIELD, uilist::fselected, item::get_all_standard_pockets(), get_auto_pickup(), detail::get_current_language_version(), item_location::get_item(), item::get_making(), Character::get_wielded_item(), good, contents_change_handler::handle_by(), item::has_flag(), visitable::has_item(), item_location::has_parent(), item::has_relic_activation(), auto_pickup::player_settings::has_rule(), itype::has_use(), recipe::ident(), iffy, item::info(), game_menus::inv::insert_items(), item::invlet, item::is_container(), item::is_corpse(), item::is_craft(), item::is_favorite, item_action_menu(), item::item_has_uses_recursive(), KEY_NPAGE, KEY_PPAGE, LEFT_OF_INFO, LEFT_TERMINAL_EDGE, m_info, avatar_action::mend(), catacurses::newwin(), item::num_item_stacks(), item_location::parent_item(), item_location::parent_pocket(), pgettext, avatar_action::plthrow(), point, Creature::pos(), uilist::query(), rate_action_change_side(), rate_action_collapse(), rate_action_disassemble(), rate_action_eat(), rate_action_expand(), rate_action_insert(), rate_action_mend(), rate_action_read(), Character::rate_action_reload(), rate_action_take_off(), Character::rate_action_unload(), rate_action_use(), rate_action_view_recipe(), rate_action_wear(), rate_action_wield(), avatar::read(), game_menus::inv::reassign_letter(), reload(), auto_pickup::player_settings::remove_rule(), uilist::reset(), item_pocket::restack(), uilist::ret, uilist::ret_act, RIGHT_OF_INFO, RIGHT_TERMINAL_EDGE, uilist::selected, string_id< T >::str(), ret_val_common::success(), Character::takeoff(), TERMX, TERMY, item::tname(), item::type, item::type_name(), item::typeId(), u, UILIST_UNBOUND, UILIST_WAIT_INPUT, Character::unload(), contents_change_handler::unseal_pocket_containing(), avatar_action::use_item(), uilist::vshift, uilist::w_x_setup, uilist::w_y_setup, Character::wear(), wield(), and item_info_data::without_getch.
| bool game::is_core_data_loaded | ( | ) | const |
Returns whether the core data is currently loaded.
Definition at line 575 of file game.cpp.
References DynamicDataLoader::get_instance(), and DynamicDataLoader::is_data_finalized().
| bool game::is_dangerous_tile | ( | const tripoint & | dest_loc | ) | const |
Definition at line 10408 of file game.cpp.
References get_dangerous_tile().
Referenced by safe_route_to(), and walk_move().
| bool game::is_empty | ( | const tripoint & | p | ) |
Returns true if there is no player, NPC, or monster on the tile and move_cost > 0.
Definition at line 5506 of file game.cpp.
References creature_tracker::creature_at(), get_creature_tracker, map::has_flag(), m, map::passable(), and TFLAG_LIQUID.
Referenced by can_move_furniture(), is_empty(), and place_player().
| bool game::is_empty | ( | const tripoint_bub_ms & | p | ) |
Definition at line 5512 of file game.cpp.
References is_empty(), and coords::coord_point_mut< Point, Subpoint, InBounds >::raw().
|
private |
Definition at line 2734 of file game.cpp.
References _, effect_on_conditions::avatar_death(), avatar_dies, bury_screen(), D_ERROR, dbg, Messages::deactivate(), events(), Character::in_vehicle, Character::is_dead_state(), m, Character::place_corpse(), Creature::pos(), effect_on_conditions::prevent_death(), query_yn(), QUIT_DIED, QUIT_NO, QUIT_SUICIDE, QUIT_WATCH, event_bus::send(), Character::set_dodges_left(), Creature::set_moves(), Character::set_pain(), u, map::unboard_vehicle(), and uquit.
| Creature * game::is_hostile_nearby | ( | ) |
Definition at line 4473 of file game.cpp.
References is_hostile_within(), and MAX_VIEW_DISTANCE.
| Creature * game::is_hostile_very_close | ( | bool | dangerous = false | ) |
Definition at line 4480 of file game.cpp.
References DANGEROUS_PROXIMITY, and is_hostile_within().
Referenced by butcher().
|
private |
Checks if there's a hostile creature within given distance.
| dangerous | If true, makes additional checks for monsters with ranged attack capabilities within distance OR if there's a route from monster to player, and returns this particular monster. |
Definition at line 4485 of file game.cpp.
References Character::attitude_to(), get_map, Character::get_visible_creatures(), Creature::HOSTILE, Creature::pos(), and u.
Referenced by is_hostile_nearby(), and is_hostile_very_close().
| field_entry * game::is_in_dangerous_field | ( | ) |
Definition at line 4509 of file game.cpp.
References map::field_at(), get_map, Creature::is_dangerous_field(), Creature::pos(), and u.
| bool game::is_in_sunlight | ( | const tripoint & | p | ) |
Returns true if p is outdoors and it is sunny.
Definition at line 5517 of file game.cpp.
References get_weather, incident_sun_irradiance(), is_sheltered(), irradiance::minimal, and calendar::turn.
| bool game::is_in_viewport | ( | const tripoint & | p, |
| int | margin = 0 |
||
| ) | const |
Definition at line 4122 of file game.cpp.
References abs(), catacurses::getmaxx(), catacurses::getmaxy(), Creature::pos(), u, Character::view_offset, w_terrain, tripoint::x, and tripoint::y.
| bool game::is_sheltered | ( | const tripoint & | p | ) |
Returns true if p is indoors, underground, or in a car.
Definition at line 5523 of file game.cpp.
References map::is_outside(), m, map::veh_at(), and tripoint::z.
Referenced by is_in_sunlight().
| bool game::is_tileset_isometric | ( | ) | const |
| bool game::is_zones_manager_open | ( | ) | const |
Definition at line 6857 of file game.cpp.
References zones_manager_open.
|
private |
Definition at line 249 of file item_action.cpp.
References _, action, uilist::additional_actions, uilist::callback, uilist::desc_enabled, item_action_generator::generator(), item_location::get_item(), item_action_generator::get_item_action_map(), get_player_character, Character::get_pseudo_items(), itype::has_use(), uilist::input_category, keycode, item_action_generator::map_actions_to_items(), NEXT, popup(), input_context::register_action(), second, uilist::text, item::type, u, itype::use_methods, and item::visit_contents().
Referenced by do_regular_action(), and inventory_item_menu().
Definition at line 4853 of file game.cpp.
References continue_line(), force, and line_to().
Referenced by forced_door_closing(), and knockback().
| void game::knockback | ( | std::vector< tripoint > & | traj, |
| int | stun, | ||
| int | dam_mult | ||
| ) |
Definition at line 4869 of file game.cpp.
References _, Creature::add_effect(), add_msg(), map::bash(), bp, Creature::check_dead_state(), creature_tracker::creature_at(), damage_bash, Character::deal_damage(), debugmsg, effect_stunned, get_creature_tracker, Creature::has_effect(), map::has_flag(), Character::has_trait(), map::impassable(), Character::is_barefoot(), knockback(), m, m_bad, mon_flag_AQUATIC, n_gettext, one_in(), Creature::pos(), Creature::posx(), Creature::posy(), Character::sees(), Creature::setpos(), avatar_action::swim(), TFLAG_LIQUID, trait_LEG_TENT_BRACE, u, tripoint::x, tripoint::y, and tripoint::z.
| unsigned char game::light_level | ( | int | zlev | ) | const |
Returns coarse number-of-squares of visibility at the current light level.
Used by monster and NPC AI.
Definition at line 4452 of file game.cpp.
References light, LIGHT_RANGE(), and natural_light_level().
Referenced by calc_driving_offset(), and update_overmap_seen().
| std::vector< std::string > game::list_active_saves | ( | ) |
Returns a list of currently active character saves.
Definition at line 3517 of file game.cpp.
References save_t::decoded_name(), and world_generator.
|
private |
Definition at line 8421 of file game.cpp.
References _, action, add_draw_callback(), c_light_gray, c_light_green, c_magenta, c_red, c_white, c_yellow, calcStartPos(), centerlistview(), CHANGE_TAB, check_items_newness(), clamp(), game_menus::inv::compare(), create_trail_callback(), string_input_popup::desc_color(), string_input_popup::description(), direction_from(), direction_name_short(), draw_custom_border(), draw_item_info(), draw_scrollbar(), string_input_popup::edit(), map_item_stack::example, FILTER, filter_item_stacks(), catacurses::getmaxy(), input_context::handle_input(), item_info_data::handle_scrolling, HIGH_PRIORITY, hilite(), string_input_popup::identifier(), invalidate_main_ui_adaptor(), item_filter_rule_string(), LINE_XOXX, LINE_XXXO, list_filter_high_priority(), list_filter_low_priority(), list_item_downvote, uistatedata::list_item_downvote, uistatedata::list_item_downvote_active, uistatedata::list_item_filter, uistatedata::list_item_filter_active, uistatedata::list_item_init, uistatedata::list_item_priority, uistatedata::list_item_priority_active, uistatedata::list_item_sort, list_item_upvote, list_items_filter_history_help(), LOW_PRIORITY, map_item_stack::map_item_stack_sort(), mark_items_read_rec(), mark_main_ui_adaptor_resize(), max(), string_input_popup::max_length(), MIGHT_BE_HIDDEN, min(), catacurses::mvwprintw(), mvwprintz(), NEW, catacurses::newwin(), pgettext, point, point_south, point_zero, Creature::pos(), Creature::pos_bub(), string_input_popup::query_string(), QUIT, ui_manager::redraw(), input_context::register_action(), remove_color_tags(), reset_item_list_state(), rl_dist(), safe_route_to(), SEEN, Character::set_destination(), sFilter, string_format(), TERMX, TERMY, string_input_popup::text(), string_input_popup::title(), to_translation(), trim_and_print(), tripoint_zero, u, uistate, utf8_width(), Character::view_offset, map_item_stack::vIG, catacurses::werase(), string_input_popup::width(), item_info_data::without_border, item_info_data::without_getch, catacurses::wnoutrefresh(), catacurses::wprintw(), wprintz(), zoom_in(), and zoom_out().
|
private |
Definition at line 8347 of file game.cpp.
References _, add_msg(), find_nearby_items(), Character::get_visible_creatures(), m_info, and u.
Referenced by do_regular_action(), and look_around().
| void game::list_missions | ( | ) |
Definition at line 312 of file mission_ui.cpp.
References mission_ui::draw_mission_ui().
Referenced by do_regular_action().
|
private |
Definition at line 8950 of file game.cpp.
References _, action, add_draw_callback(), safemode::add_rule(), Creature::ANY, Creature::basic_symbol_color(), BLACKLISTED, bVMonsterLookFire, c_light_gray, c_light_green, c_magenta, c_white, c_yellow, calcStartPos(), centerlistview(), CHANGE_TAB, color(), create_trail_callback(), direction_from(), direction_name_short(), Creature::disp_name(), draw_custom_border(), draw_scrollbar(), FIRE, npc::get_attitude(), Creature::get_attitude_ui_data(), Creature::get_hp(), get_hp_bar(), Creature::get_hp_max(), get_safemode(), Character::get_wielded_item(), catacurses::getmaxy(), item::gun_range(), input_context::handle_input(), safemode::has_rule(), Character::has_trait(), hilite(), invalidate_main_ui_adaptor(), Character::last_target, LINE_XOXO, LINE_XOXX, LINE_XXXO, look_around(), m, mark_main_ui_adaptor_resize(), MAX_RECOIL, catacurses::mvwprintw(), mvwprintz(), map::name(), navigate_ui_list(), catacurses::newwin(), npc_attitude_name(), safemode::npc_type_name(), point, point_east, point_south, point_zero, Creature::pos(), input_context::press_x(), Creature::print_info(), QUIT, Character::recoil, ui_manager::redraw(), input_context::register_action(), input_context::register_navigate_ui_list(), safemode::remove_rule(), right_print(), rl_dist(), Creature::sees(), shared_from(), shortcut_print(), string_format(), Character::symbol_color(), TERMX, TERMY, trait_INATTENTIVE, trim_and_print(), tripoint_zero, u, utf8_width(), Character::view_offset, catacurses::werase(), catacurses::wnoutrefresh(), catacurses::wprintw(), wprintz(), zoom_in(), and zoom_out().
|
private |
Definition at line 3070 of file game.cpp.
References _, abort, assign_npc_id(), map::build_map_cache(), chrono_seconds, uistatedata::deserialize(), Character::enchantment_cache, events(), file_exist(), game_load, game_save, gamemode, map::get_abs_sub(), get_auto_notes_settings(), get_auto_pickup(), avatar::get_avatar_diary(), stats_tracker::get_events(), zone_manager::get_manager(), JsonValue::get_object(), get_player_character, get_safemode(), cata_path::get_unrelative_path(), Character::getID(), getVersionString(), Character::in_vehicle, init_autosave(), Character::inv_dump(), character_id::is_valid(), event_multiset::last(), diary::load(), auto_notes::auto_note_settings::load(), auto_pickup::player_settings::load_character(), safemode::load_character(), effect_on_conditions::load_existing_character(), avatar::load_map_memory(), load_master(), zone_manager::load_zones(), m, mostseen, om_direction::name(), optional_vpart_position::part_with_feature(), Creature::pos(), read_from_file(), read_from_file_optional(), read_from_file_optional_json(), Character::recalc_sight_limits(), Character::recalculate_enchantment_cache(), reload_npcs(), Character::reset(), safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, SAVE_EXTENSION(), SAVE_EXTENSION_LOG(), SAVE_EXTENSION_SHORTCUTS(), event_bus::send(), calendar::set_eternal_day(), calendar::set_eternal_night(), calendar::set_eternal_season(), avatar::set_save_id(), calendar::set_season_length(), Character::setID(), stats(), time_of_last_load, time_played_at_last_load, u, uistate, unserialize(), update_map(), validate_camps(), validate_linked_vehicles(), validate_mounted_npcs(), validate_npc_followers(), map::veh_at(), PATH_INFO::world_base_save_path_path(), and coords::coord_point_mut< Point, Subpoint, InBounds >::z().
| bool game::load | ( | const std::string & | world | ) |
Attempt to load first valid save (if any) in world.
Definition at line 3046 of file game.cpp.
References debugmsg, g, world_generator, and WORLD::world_saves.
| void game::load_core_data | ( | loading_ui & | ui | ) |
Loads core dynamic data.
May throw.
Definition at line 580 of file game.cpp.
References DynamicDataLoader::get_instance(), PATH_INFO::jsondir(), load_data_from_dir(), and DynamicDataLoader::unload_data().
Referenced by check_mod_data(), and setup().
|
protected |
Loads dynamic data from the given directory.
May throw.
Definition at line 589 of file game.cpp.
References DynamicDataLoader::get_instance(), and DynamicDataLoader::load_data_from_path().
Referenced by check_mod_data(), load_core_data(), and load_packs().
| void game::load_map | ( | const tripoint_abs_sm & | pos_sm, |
| bool | pump_events = false |
||
| ) |
Load the main map at given location, see map::load, in global, absolute submap coordinates.
| pump_events | If true, handle window events during loading. If you set this to true, do ensure that the map is not accessed before this function returns (for example, UIs that draw the map should be disabled). |
Definition at line 843 of file game.cpp.
References map::load(), and m.
Referenced by place_player_overmap(), start_game(), and unserialize().
|
private |
Definition at line 3038 of file game.cpp.
References read_from_file_optional(), SAVE_MASTER(), unserialize_master(), and PATH_INFO::world_base_save_path_path().
Referenced by load(), and start_game().
| void game::load_npcs | ( | ) |
Makes any nearby NPCs on the overmap active.
Definition at line 1188 of file game.cpp.
References add_msg_debug, half_open_rectangle< Point, >::contains(), critter_tracker, debugmode::DF_NPC, get_map, overmapbuffer::get_npcs_near_player(), HALF_MAPSIZE, map::inbounds(), m, MAPSIZE, npcs_dirty, npc::on_load(), overmap_buffer, temp, coords::coord_point_base< Point >::to_string_writable(), and coords::coord_point< Point, Origin, Scale, InBounds >::xy().
Referenced by perhaps_add_random_npc(), place_player_overmap(), reload_npcs(), save_cyborg(), spawn_hallucination(), spawn_npc(), start_game(), and update_map().
| bool game::load_packs | ( | const std::string & | msg, |
| const std::vector< mod_id > & | packs, | ||
| loading_ui & | ui | ||
| ) |
Load content packs.
| msg | string to display whilst loading prompt |
| packs | content packs to load in correct dependent order |
| ui | structure for load progress display |
Definition at line 3271 of file game.cpp.
References available, string_id< T >::c_str(), check_plural, debugmsg, string_id< T >::is_valid(), load_data_from_dir(), MOD_INFORMATION::name(), and none.
| void game::load_static_data | ( | ) |
Loads static data that does not depend on mods or similar.
Definition at line 468 of file game.cpp.
References fullscreen, get_auto_notes_settings(), get_auto_pickup(), DynamicDataLoader::get_instance(), get_safemode(), input_manager::init(), inp_mngr, auto_notes::auto_note_settings::load(), auto_pickup::player_settings::load_global(), safemode::load_global(), show_panel_adm, and was_fullscreen.
| void game::load_world_modfiles | ( | loading_ui & | ui | ) |
Loads core data and mods from the active world.
May throw.
Definition at line 3236 of file game.cpp.
References anonymous_namespace{item_tname.cpp}::mods(), and world_generator.
Referenced by setup().
| std::optional< tripoint > game::look_around | ( | ) |
Definition at line 7639 of file game.cpp.
References center, Creature::pos(), look_around_result::position, u, and Character::view_offset.
Referenced by chat(), list_monsters(), look_around(), peek(), and zones_manager().
| look_around_result game::look_around | ( | bool | show_window, |
| tripoint & | center, | ||
| const tripoint & | start_point, | ||
| bool | has_first_point, | ||
| bool | select_zone, | ||
| bool | peeking, | ||
| bool | is_moving_zone = false, |
||
| const tripoint & | end_point = tripoint_zero, |
||
| bool | change_lv = true |
||
| ) |
| show_window | display the info window that holds the tile information in the position. |
| center | used to calculate the u.view_offset, could center the screen to the position it represents |
| start_point | the start point of the targeting zone, also the initial local position of the cursor |
| has_first_point | should be true if the first point has been selected when editing the zone |
| select_zone | true if the zone is being edited |
| peeking | determines if the player is peeking |
| is_moving_zone | true if the zone is being moved, false by default |
| end_point | the end point of the targeting zone, only used if is_moving_zone is true, default is tripoint_zero |
| change_lv | determines allow if change z-level |
Definition at line 7649 of file game.cpp.
References _, action, add_draw_callback(), add_msg(), add_msg_debug, map::build_map_cache(), bVMonsterLookFire, c_green, c_light_green, c_red, c_white, center, center_print(), clamp(), create_zone_callback(), creature_tracker::creature_at(), D_PEDANTIC_INFO, dbg, debugmode::DF_GAME, display_lighting(), display_radiation(), display_scent(), display_temperature(), display_transparency(), draw_border(), draw_look_around_cursor(), extended_description(), fov_3d_z_range, map::get_abs_sub(), input_context::get_action_name(), input_context::get_coordinates(), get_creature_tracker, panel_manager::get_current_layout(), input_context::get_desc(), input_context::get_direction(), panel_manager::get_manager(), get_map, map::get_visibility_variables_cache(), panel_manager::get_width_left(), get_zoom(), catacurses::getmaxy(), input_context::handle_input(), invalidate_main_ui_adaptor(), map::invalidate_map_cache(), map::invalidate_visibility_cache(), is_looking, MAP_SHARING::isCompetitive(), MAP_SHARING::isDebugger(), input_context::keys_bound_to(), list_items_monsters(), m, mark_main_ui_adaptor_resize(), max(), min(), mouse_edge_scrolling_terrain(), mvwprintz(), catacurses::newwin(), monster::nickname, OVERMAP_DEPTH, OVERMAP_HEIGHT, PA_BLIND_THROW, panel_layout::panels(), look_around_result::peek_action, pixel_minimap_option, point, popup(), Creature::pos(), Creature::pos_bub(), look_around_result::position, Creature::posz(), pre_print_all_tile_info(), coords::coord_point_mut< Point, Subpoint, InBounds >::raw(), ui_manager::redraw(), reenter_fullscreen(), input_context::register_action(), input_context::register_directions(), input_context::reset_timeout(), right_print(), safe_route_to(), Character::sees(), Character::set_destination(), input_context::set_iso(), input_context::set_timeout(), set_zoom(), square_dist(), string_format(), temp_exit_fullscreen(), ter_view_p, TERMX, TERMY, tileset_zoom, toggle_debug_hour_timer(), toggle_pixel_minimap(), tripoint_zero, u, map::update_visibility_cache(), Character::view_offset, w_pixel_minimap, w_terrain, catacurses::werase(), catacurses::wnoutrefresh(), coords::coord_point_mut< Point, Subpoint, InBounds >::x(), tripoint::xy(), coords::coord_point_mut< Point, Subpoint, InBounds >::y(), coords::coord_point_mut< Point, Subpoint, InBounds >::z(), tripoint::z, zoom_in(), and zoom_out().
| look_around_result game::look_around | ( | look_around_params | looka_params | ) |
Definition at line 8011 of file game.cpp.
References look_around_params::center, look_around_params::change_lv, look_around_params::has_first_point, look_around(), look_around_params::peeking, look_around_params::select_zone, look_around_params::show_window, look_around_params::start_point, and tripoint_zero.
| std::optional< tripoint > game::look_debug | ( | ) |
| void game::mark_main_ui_adaptor_resize | ( | ) | const |
Definition at line 3806 of file game.cpp.
References main_ui_adaptor.
Referenced by do_regular_action(), list_items(), list_monsters(), look_around(), toggle_fullscreen(), and toggle_pixel_minimap().
|
private |
Definition at line 3437 of file game.cpp.
References memorial_logger_ptr.
Referenced by save_player_data(), and write_memorial_file().
| void game::mon_info_update | ( | ) |
Definition at line 4596 of file game.cpp.
References _, ABOVECENTER, ABOVEEAST, ABOVENORTH, ABOVENORTHEAST, ABOVENORTHWEST, ABOVESOUTH, ABOVESOUTHEAST, ABOVESOUTHWEST, ABOVEWEST, Creature::add_effect(), add_msg(), monster::attitude(), monster::attitude_to(), npc::attitude_to(), BELOWCENTER, BELOWEAST, BELOWNORTH, BELOWNORTHEAST, BELOWNORTHWEST, BELOWSOUTH, BELOWSOUTHEAST, BELOWSOUTHWEST, BELOWWEST, BLACKLISTED, c, cancel_activity_or_ignore_query(), cata_fatal, CENTER, safemode::check_monster(), Character::controlling_vehicle, monster_visible_info::dangerous, direction_from(), uistatedata::distraction_hostile_spotted, EAST, effect_adrenaline_mycus, safemode::empty(), time_duration::from_turns(), npc::get_attitude(), Creature::get_effect_int(), avatar::get_mon_visible(), get_player_character, get_safemode(), Character::get_visible_creatures(), monster_visible_info::has_dangerous_creature_in_proximity, Creature::has_effect(), Character::has_trait(), hostile_spotted_far, monster::ignoring, mtype::in_species(), is_valid_in_w_terrain(), last, monster::lastseen_turn, m, m_info, m_warning, MAPSIZE_X, MATT_ATTACK, MATT_FOLLOW, MAX_VIEW_DISTANCE, Character::mod_pain(), mostseen, monster::name(), monster_visible_info::new_seen_mon, NORTH, NORTHEAST, NORTHWEST, NPCATT_KILL, Creature::pos(), POSX, POSY, rl_dist(), safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, SAFE_MODE_STOP, Creature::sees(), set_safe_mode(), shared_from(), SOUTH, SOUTHEAST, SOUTHWEST, species_PLANT, string_format(), trait_M_DEFENDER, calendar::turn, calendar::turn_zero, turnssincelastmon, monster::type, u, uistate, monster_visible_info::unique_mons, monster_visible_info::unique_types, Character::view_offset, WEST, and tripoint::xy().
|
private |
Definition at line 2384 of file game.cpp.
References input_context::get_raw_input(), iso, last, last_mouse_edge_scroll, mouse, cata::hash64_detail::ret, speed, timeout, tripoint_zero, point::x, and point::y.
Referenced by mouse_edge_scrolling_overmap(), and mouse_edge_scrolling_terrain().
| tripoint game::mouse_edge_scrolling_overmap | ( | input_context & | ctxt | ) |
This variant is suitable for the overmap.
Definition at line 2446 of file game.cpp.
References last_mouse_edge_scroll_vector_overmap, last_mouse_edge_scroll_vector_terrain, mouse_edge_scrolling(), cata::hash64_detail::ret, and tripoint_zero.
| tripoint game::mouse_edge_scrolling_terrain | ( | input_context & | ctxt | ) |
Used to implement mouse "edge scrolling".
Returns a tripoint which is a vector of the resulting "move", i.e. (0, 0, 0) if the mouse is not at the edge of the screen, otherwise some (x, y, 0) depending on which edges are hit. This variant adjust scrolling speed according to zoom level, making it suitable when viewing the "terrain".
Definition at line 2437 of file game.cpp.
References DEFAULT_TILESET_ZOOM, g, last_mouse_edge_scroll_vector_overmap, last_mouse_edge_scroll_vector_terrain, max(), mouse_edge_scrolling(), cata::hash64_detail::ret, tileset_zoom, and tripoint_zero.
Referenced by look_around().
|
private |
Definition at line 3005 of file game.cpp.
References assure_dir_exist(), base64_encode(), debugmsg, get_files_from_path(), avatar::get_save_id(), PATH_INFO::graveyarddir(), prefix, remove_file(), rename_file(), timestamp_now(), u, and PATH_INFO::world_base_save_path().
| void game::moving_vehicle_dismount | ( | const tripoint & | dest_loc | ) |
Handles players exiting from moving vehicles.
Definition at line 5811 of file game.cpp.
References _, add_msg(), debugmsg, tileray::dir(), vehicle::face, fling_creature(), map::has_flag(), m, Creature::mod_moves(), vehicle::name, Creature::pos(), Creature::posx(), Creature::posy(), TFLAG_SWIMMABLE, u, map::unboard_vehicle(), map::veh_at(), vehicle::velocity, and tripoint::xy().
| float game::natural_light_level | ( | int | zlev | ) | const |
Definition at line 4396 of file game.cpp.
References ARTIFACT_LIGHT, CUSTOM_LIGHT_LEVEL, default_daylight_level(), DIM, timed_event_manager::get(), get_weather, latest_lightlevels, left, LIGHT_AMBIENT_MINIMAL, weather_type::light_modifier, max(), OVERMAP_HEIGHT, timed_event_manager::queued(), cata::hash64_detail::ret, sun_moon_light_at(), timed_events, calendar::turn, and weather_manager::weather_id.
Referenced by light_level().
| bool game::npc_menu | ( | npc & | who | ) |
Returns true if the menu handled stuff and player shouldn't do anything else.
Perception slightly increases precision when examining NPCs' wounds \EFFECT_FIRSTAID increases precision when examining NPCs' woundsDefinition at line 5941 of file game.cpp.
References _, add_msg(), uilist::addentry(), npc::as_npc(), spell_effect::attack(), Character::body_window(), Character::can_wear(), debug_mode, avatar::disarm(), Character::disp_name(), display_bodygraph(), use_function::get_actor_ptr(), avatar::get_grab_type(), Character::get_name(), Character::get_skill_level(), get_talker_for(), item::has_flag(), Character::has_proficiency(), Character::i_rem(), Character::in_sleep_state(), avatar::invoke_item(), Character::is_armed(), npc::is_enemy(), npc::is_friendly(), npc::is_hallucination(), Character::is_mounted(), npc::is_npc(), npc::is_player_ally(), json_flag_SPLINT, heal_actor::limb_power, m_warning, Character::melee_attack(), Creature::mod_moves(), npc::move_away_from(), NONE, npc::on_attacked(), npc::op_of_u, Character::per_cur, Creature::pos(), proficiency_prof_wound_care, proficiency_prof_wound_care_expert, prompt_dangerous_tile(), anonymous_namespace{monexamine.cpp}::push(), uilist::query(), query_yn(), snippet_library::random_from_category(), uilist::ret, npc::say(), skill_firstaid, SNIPPET, outfit::sort_armor(), game_menus::inv::steal(), avatar::steal(), string_format(), ret_val_common::success(), swap_critters(), swap_pos(), avatar::talk_to(), uilist::text, game_menus::inv::titled_filter_menu(), npc_trading::trade(), npc_opinion::trust, u, avatar_action::use_item(), npc::wear_if_wanted(), and Character::worn.
Referenced by examine().
| size_t game::num_creatures | ( | ) | const |
Returns the approximate number of creatures in the reality bubble.
Because of performance restrictions it may return a slightly incorrect values (as it includes dead, but not yet cleaned up creatures).
Definition at line 5273 of file game.cpp.
References critter_tracker.
Referenced by display_visibility().
| void game::on_move_effects | ( | ) |
Definition at line 11654 of file game.cpp.
References _, Creature::add_effect(), Character::add_msg_if_player(), bio_jointservo, Character::can_run(), sfx::do_ambient(), effect_winded, Character::find_bionic_by_type(), Character::force_bionic_deactivation(), item::fuel_energy(), Character::get_bionic_fueled_with_muscle(), Character::get_power_level(), Character::get_stamina(), Character::has_active_bionic(), Character::is_mounted(), Character::is_running(), m_bad, Character::martial_arts_data, Character::mod_power_level(), bionic_data::power_trigger, avatar::toggle_run_mode(), and u.
Referenced by phasing_move(), and walk_move().
| void game::on_options_changed | ( | ) |
|
private |
Definition at line 1842 of file handle_action.cpp.
References _, game_menus::inv::consume_drink(), game_menus::inv::consume_food(), game_menus::inv::consume_meds(), avatar_action::eat(), avatar_action::eat_or_use(), uilist::entries, get_avatar, uilist::query(), uilist::ret, and uilist::text.
Referenced by do_regular_action().
| void game::open_gate | ( | const tripoint_bub_ms & | p | ) |
Definition at line 5806 of file game.cpp.
References gates::open_gate(), and u.
| void game::peek | ( | ) |
Definition at line 6352 of file game.cpp.
References _, choose_direction(), Creature::get_location(), map::impassable(), m, Creature::move_to(), Creature::pos(), u, vertical_move(), map::vertical_shift(), and coords::coord_point_mut< Point, Subpoint, InBounds >::z().
Referenced by do_regular_action().
| void game::peek | ( | const tripoint & | p | ) |
Definition at line 6380 of file game.cpp.
References avatar::activate_crouch_mode(), map::build_map_cache(), center, Character::get_speed(), map::invalidate_map_cache(), map::invalidate_visibility_cache(), Character::is_crouching(), look_around(), m, Creature::mod_moves(), PA_BLIND_THROW, look_around_result::peek_action, avatar_action::plthrow(), Creature::pos(), avatar::reset_move_mode(), Creature::setpos(), u, map::update_visibility_cache(), and tripoint::z.
| void game::perhaps_add_random_npc | ( | bool | ignore_spawn_timers_and_rates | ) |
Definition at line 12795 of file game.cpp.
References effect_fake_common_cold, effect_fake_flu, faction_manager_ptr, faction_no_faction, overmapbuffer::get_npcs_near_player(), Creature::global_omt_location(), Character::has_trait(), faction_template::id, overmapbuffer::insert_npc(), is_water_body(), load_npcs(), NPC_MISSION_NULL, calendar::once_every(), one_in(), ORIGIN_ANY_NPC, overmap_buffer, point, mission::reserve_random(), rng(), overmapbuffer::ter(), trait_NPC_STARTING_NPC, trait_NPC_STATIC_NPC, u, and x_in_y().
| bool game::phasing_move | ( | const tripoint & | dest, |
| bool | via_ramp = false |
||
| ) |
Definition at line 11285 of file game.cpp.
References _, add_msg(), Character::add_msg_if_player(), bio_probability_travel, map::board_vehicle(), creature_tracker::creature_at(), map::creature_on_trap(), flag_DIMENSIONAL_ANCHOR, get_creature_tracker, Character::get_power_level(), avatar::grab(), Character::has_active_bionic(), Character::has_flag(), map::impassable(), Character::in_vehicle, m, m_info, Creature::mod_moves(), Character::mod_power_level(), NONE, on_move_effects(), optional_vpart_position::part_with_feature(), Creature::pos(), Creature::posx(), Creature::posy(), Creature::posz(), bionic_data::power_trigger, Creature::setpos(), sgn(), u, map::unboard_vehicle(), map::veh_at(), Character::worn_with_flag(), point::x, tripoint::x, point::y, tripoint::y, and tripoint::z.
|
private |
Definition at line 6319 of file game.cpp.
References _, ACTION_PICKUP, choose_adjacent_highlight(), Character::pick_up(), game_menus::inv::pickup(), and u.
Referenced by do_regular_action(), and examine().
| void game::pickup | ( | const tripoint & | p | ) |
Definition at line 6338 of file game.cpp.
References add_draw_callback(), map::drawsq(), m, Character::pick_up(), game_menus::inv::pickup(), u, and w_terrain.
|
private |
Definition at line 6332 of file game.cpp.
References Character::pick_up(), game_menus::inv::pickup(), and u.
Referenced by do_regular_action().
Definition at line 5219 of file game.cpp.
References center.
Referenced by place_critter_at(), revive_corpse(), and start_game().
| monster * game::place_critter_around | ( | const shared_ptr_fast< monster > & | mon, |
| const tripoint & | center, | ||
| int | radius, | ||
| bool | forced = false |
||
| ) |
Definition at line 5230 of file game.cpp.
References can_place_monster(), center, choose_where_to_place_monster(), critter_tracker, m, and map::points_in_radius().
Adds critters to the reality bubble, creating them if necessary.
Functions taking a id parameter will construct a monster based on that id, (with default properties). Functions taking a mon parameter will use the supplied monster instance instead (which must not be null). Note: the monster will not be upgraded by these functions, it is placed as is.
place_critter_at will place the creature exactly at the given point.
place_critter_around will place the creature around the center p within the given radius (radius 0 means only the center point is used). The chosen point will be as close to the center as possible.
place_critter_within will place the creature at a random point within that given range. (All points within have equal probability.)
mon). Definition at line 5209 of file game.cpp.
References place_critter_around().
| monster * game::place_critter_at | ( | const shared_ptr_fast< monster > & | mon, |
| const tripoint & | p | ||
| ) |
Definition at line 5214 of file game.cpp.
References place_critter_around().
| monster * game::place_critter_within | ( | const mtype_id & | id, |
| const tripoint_range< tripoint > & | range | ||
| ) |
Definition at line 5253 of file game.cpp.
| monster * game::place_critter_within | ( | const shared_ptr_fast< monster > & | mon, |
| const tripoint_range< tripoint > & | range | ||
| ) |
Definition at line 5262 of file game.cpp.
References choose_where_to_place_monster(), and critter_tracker.
Definition at line 10870 of file game.cpp.
References _, ACT_BUTCHER, ACT_PULP, ACTION_CONTROL_VEHICLE, Character::activity, Creature::add_effect(), add_msg(), Character::assign_activity(), player_activity::auto_resume, Pickup::autopickup(), map::board_vehicle(), body_part_name_accusative(), bp, map_data_common_t::can_examine(), map::can_put_items(), check_zone(), map::creature_in_field(), map::creature_on_trap(), damage_acid, damage_bash, damage_cut, Character::deal_damage(), Character::dex_cur, displace_XY(), Character::drench(), EAST, effect_bouldering, effect_no_sight, effect_onfire, effect_ridden, effect_riding, effect_tetanus, item_stack::empty(), map_data_common_t::examine(), fd_acid, map::furn(), map::furnname(), map::get_abs_sub(), Character::get_armor_type(), get_creature_tracker, Creature::get_drenching_body_parts(), Creature::get_hp(), optional_vpart_position::get_label(), avatar::get_mon_visible(), Creature::get_random_body_part(), map::get_signage(), map::getglobal(), map::graffiti_at(), iexamine::harvest_furn(), iexamine::harvest_furn_nectar(), iexamine::harvest_plant_ex(), iexamine::harvest_ter(), iexamine::harvest_ter_nectar(), monster_visible_info::has_dangerous_creature_in_proximity, Creature::has_effect(), map_data_common_t::has_examine(), Character::has_flag(), map::has_flag(), map::has_flag_furn(), map::has_flag_ter(), map::has_flag_ter_or_furn(), map::has_graffiti_at(), map::has_items(), Character::has_proficiency(), Character::has_trait(), map::has_vehicle_floor(), map::i_at(), Character::in_vehicle, calendar::INDEFINITELY_LONG, Character::is_blind(), is_empty(), Character::is_hauling(), Character::is_immune_damage(), Character::is_immune_field(), Character::is_mounted(), json_flag_INFECTION_IMMUNE, m, m_bad, m_info, Character::max_quality(), mon_flag_REVIVES, mostseen, Character::mounted_creature, monster::move_to(), n_gettext, monster::name(), PATH_INFO::names(), NORTH, NORTHEAST, NORTHWEST, one_in(), optional_vpart_position::part_with_feature(), PICKUP_RANGE, player_activity::placement, map::points_in_radius(), Creature::pos(), math_opers::pos(), press_x(), monster::process_triggers(), proficiency_prof_parkour, qual_BUTCHER, random_entry_removed(), Creature::remove_effect(), rng(), Character::search_surroundings(), Creature::setpos(), iexamine::shrub_marloss(), iexamine::shrub_wildveggies(), SOUTH, SOUTHEAST, SOUTHWEST, Character::stop_hauling(), player_activity::str_values, string_format(), player_activity::targets, map::ter(), map::tername(), TFLAG_DEEP_WATER, TFLAG_NO_SIGHT, TFLAG_ROUGH, TFLAG_SEALED, TFLAG_SHARP, TFLAG_SWIMMABLE, TFLAG_UNSTABLE, trait_ILLITERATE, trait_INFRESIST, trait_THICKSKIN, trait_WAYFARER, iexamine::tree_marloss(), u, map::unboard_vehicle(), update_map(), map::veh_at(), vertical_shift(), WEST, x_in_y(), tripoint::xy(), coords::coord_point_mut< Point, Subpoint, InBounds >::z(), tripoint::z, and zone_type_NO_AUTO_PICKUP.
Referenced by place_player_overmap(), and walk_move().
| void game::place_player_overmap | ( | const tripoint_abs_omt & | om_dest, |
| bool | move_player = true |
||
| ) |
Definition at line 11247 of file game.cpp.
References map::access_cache(), all_monsters(), map::clear_vehicle_list(), despawn_monster(), effect_ridden, effect_riding, map::get_abs_sub(), HALF_MAPSIZE, Character::in_vehicle, Character::is_mounted(), load_map(), load_npcs(), m, level_cache::map_memory_cache_dec, level_cache::map_memory_cache_ter, Character::mounted_creature, weather_manager::nextweather, OVERMAP_DEPTH, OVERMAP_HEIGHT, place_player(), point, Creature::pos(), map::rebuild_vehicle_level_caches(), Creature::remove_effect(), map::spawn_monsters(), calendar::turn, u, map::unboard_vehicle(), unload_npcs(), update_overmap_seen(), weather, tripoint::xy(), and coords::coord_point_mut< Point, Subpoint, InBounds >::z().
|
private |
Definition at line 1136 of file game.cpp.
References tinymap::add_vehicle(), vehicle::can_float(), overmapbuffer::find_all(), tinymap::getabs(), map::getlocal(), tinymap::load(), m, vehicle::max_ground_velocity(), omt_find_params::min_distance, ms_to_sm_remain(), overmap_buffer, vehicle::pos, random_entry(), rng(), tinymap::save(), omt_find_params::search_range, SEEX, SEEY, vehicle::sm_pos, vehicle::toggle_tracking(), type, omt_find_params::types, vehicle::unlock(), and tripoint::xy().
Referenced by start_game().
| std::optional< tripoint > game::point_selection_menu | ( | const std::vector< tripoint > & | pts, |
| bool | up = true |
||
| ) |
Definition at line 11913 of file game.cpp.
References _, uilist::addentry(), debugmsg, direction_arrow(), direction_from(), direction_name(), get_player_character, MENU_AUTOASSIGN, Creature::pos(), uilist::query(), cata::hash64_detail::ret, uilist::ret, string_format(), uilist::title, and tripoint::xy().
Referenced by do_regular_action(), and vertical_move().
| bool game::portal_storm_query | ( | distraction_type | type, |
| const std::string & | text | ||
| ) |
Definition at line 1510 of file game.cpp.
References ACT_TRAVELLING, Character::activity, Character::backlog, c_blue, c_green, c_light_blue, c_light_green, c_light_red, c_red, c_yellow, cancel_auto_move(), color(), query_popup::context(), query_popup::default_color(), Character::get_auto_move_route(), Character::has_distant_destination(), player_activity::ignore_distraction(), player_activity::is_distraction_ignored(), query_popup::message(), query_popup::option(), query_popup::query(), random_entry(), ui_manager::redraw(), refresh_display(), Character::set_destination(), type, and u.
| void game::pre_print_all_tile_info | ( | const tripoint & | lp, |
| const catacurses::window & | w_info, | ||
| int & | line, | ||
| int | last_line, | ||
| const visibility_variables & | cache | ||
| ) |
Definition at line 7575 of file game.cpp.
References oter_t::get_name(), map::getabs(), m, ms_to_omt_copy(), overmap_buffer, print_all_tile_info(), and overmapbuffer::ter().
Referenced by look_around().
| void game::print_all_tile_info | ( | const tripoint & | lp, |
| const catacurses::window & | w_look, | ||
| const std::string & | area_name, | ||
| int | column, | ||
| int & | line, | ||
| int | last_line, | ||
| const visibility_variables & | cache | ||
| ) |
Definition at line 6472 of file game.cpp.
References _, map::apparent_light_at(), BOOMER, BOOMER_DARK, c_light_gray, CLEAR, creature, creature_tracker::creature_at(), DARK, fold_and_print(), get_creature_tracker, map::get_visibility(), catacurses::getmaxx(), HIDDEN, map::inbounds(), line, LIT, m, catacurses::mvwprintw(), OVERMAP_DEPTH, OVERMAP_HEIGHT, point, print_creature_info(), print_fields_info(), print_graffiti_info(), print_items_info(), print_part_con_info(), print_terrain_info(), print_trap_info(), print_vehicle_info(), print_visibility_info(), Character::sees_with_infrared(), Character::sees_with_specials(), sounds::sound_at(), u, map::veh_at(), veh_pointer_or_null(), and tripoint::z.
Referenced by pre_print_all_tile_info().
|
private |
Definition at line 6760 of file game.cpp.
References creature, line, Character::sees(), and u.
Referenced by print_all_tile_info().
|
private |
Definition at line 6706 of file game.cpp.
References field::begin(), c_white, field_entry::color(), field::end(), map::field_at(), fold_and_print(), get_fire_fuel_string(), catacurses::getmaxx(), map::has_flag(), line, m, mvwprintz(), field_entry::name(), point, om_direction::size, map::ter(), ter_t_pit, ter_t_pit_shallow, and TFLAG_FIRE_CONTAINER.
Referenced by print_all_tile_info().
|
private |
Definition at line 6663 of file game.cpp.
References c_light_gray, c_white, furn_t::crafting_pseudo_item, map_data_common_t::description, foldstring(), format_item_info(), map::furn(), map::furnname(), catacurses::getmaxx(), map::has_furn(), string_id< T >::is_empty(), line, m, mvwprintz(), int_id< T >::obj(), point, QUALITIES, item::qualities_info(), string_format(), trim_and_print(), and uppercase_first_letter().
Referenced by print_terrain_info().
|
private |
Definition at line 6830 of file game.cpp.
References _, c_light_gray, fold_and_print(), catacurses::getmaxx(), map::graffiti_at(), map::has_graffiti_at(), line, m, point, map::ter(), and ter_t_grave_new.
Referenced by print_all_tile_info().
|
private |
Definition at line 6793 of file game.cpp.
References _, add_visible_items_recursive(), c_yellow, map::could_see_items(), effect_blind, flag_BLIND, catacurses::getmaxx(), Creature::has_effect(), map::has_flag(), map::i_at(), line, m, catacurses::mvwprintw(), mvwprintz(), pgettext, point, map::sees_some_items(), TFLAG_CONTAINER, trim_and_print(), u, and Character::worn_with_flag().
Referenced by print_all_tile_info().
|
private |
Definition at line 6741 of file game.cpp.
References _, c_white, partial_con::counter, fold_and_print(), catacurses::getmaxx(), construction::group, partial_con::id, line, m, construction_group::name(), int_id< T >::obj(), map::partial_con_at(), point, and string_format().
Referenced by print_all_tile_info().
|
private |
Definition at line 6577 of file game.cpp.
References _, map::ambient_light_at(), below, c_dark_gray, c_light_gray, c_light_red, c_white, c_yellow, map::coverage(), map_data_common_t::description, map::features(), fold_and_print(), foldstring(), map::furnname(), rotatable_symbols::get(), get_light_level(), map::get_signage(), get_timed_events, catacurses::getmaxx(), map::has_flag(), map::has_floor(), map::has_floor_or_support(), map::has_furn(), Character::has_trait(), map::impassable(), LIGHT_AMBIENT_LIT, line, m, max(), map::move_cost(), mvwprintz(), int_id< T >::obj(), OVERMAP_DEPTH, OVERRIDE_PLACE, point, print_furniture_info(), string_format(), map::ter(), map::tername(), TFLAG_TREE, trait_ILLITERATE, u, uppercase_first_letter(), utf8_width(), tripoint::xy(), and tripoint::z.
Referenced by print_all_tile_info().
|
private |
Definition at line 6729 of file game.cpp.
References trap::can_see(), trap::color, line, m, mvwprintz(), trap::name(), point, map::tr_at(), and u.
Referenced by print_all_tile_info().
|
private |
Definition at line 6769 of file game.cpp.
References _, c_light_gray, c_white, catacurses::getmaxx(), line, mvwprintz(), vehicle::name, point, vehicle::print_part_list(), and utf8_width().
Referenced by print_all_tile_info().
|
private |
Definition at line 6548 of file game.cpp.
References _, BOOMER, BOOMER_DARK, c_light_gray, CLEAR, DARK, HIDDEN, line, LIT, mvwprintz(), and point.
Referenced by print_all_tile_info().
| bool game::prompt_dangerous_tile | ( | const tripoint & | dest_loc | ) | const |
Definition at line 10413 of file game.cpp.
References _, add_msg(), effect_psi_stunned, effect_stunned, enumerate_as_string(), get_dangerous_tile(), Creature::has_effect(), Character::is_mounted(), m, m_warning, Character::mounted_creature, query_yn(), map::tr_at(), tr_ledge, and u.
Referenced by npc_menu(), and walk_move().
| void game::quickload | ( | ) |
Definition at line 13066 of file game.cpp.
References _, save_t::from_save_id(), avatar::get_save_id(), last_save_timestamp, moves_since_last_save, popup_getkey(), main_menu::queued_save_id_to_load, main_menu::queued_world_to_load, QUIT_NOSAVED, WORLD::save_exists(), Creature::set_moves(), u, uquit, world_generator, and WORLD::world_name.
Referenced by do_regular_action().
| void game::quicksave | ( | ) |
Definition at line 13044 of file game.cpp.
References _, add_msg(), last_save_timestamp, m_info, moves_since_last_save, popup(), ui_manager::redraw(), refresh_display(), and save().
Referenced by autosave(), and do_regular_action().
| void game::reenter_fullscreen | ( | ) |
Definition at line 752 of file game.cpp.
References fullscreen, toggle_fullscreen(), and was_fullscreen.
Referenced by look_around().
|
private |
Definition at line 9936 of file game.cpp.
References _, add_msg(), Character::add_msg_if_player(), item::reload_option::ammo, Character::ammo_location, item::ammo_remaining(), Character::assign_activity(), itype::can_use(), cant, Character::crush_frozen_liquid(), favorite_ammo_or_select(), flag_ALLOWS_REMOTE_USE, flag_RELOAD_AND_SHOOT, item_location::get_item(), item::get_var(), good, Character::has_charges(), item::has_flag(), visitable::has_item(), iffy, item::is_ammo_belt(), item::is_ammo_container(), item::is_container_full(), item::is_frozen_liquid(), item::is_magazine(), item::is_watertight_container(), m_info, m_warning, itype::magazine, item::nname(), item::num_item_stacks(), item_location::obtain(), item::only_item(), Pickup::prompt, Character::rate_action_reload(), item::remaining_ammo_capacity(), avatar::select_ammo(), item::tname(), item::type, and u.
Referenced by inventory_item_menu(), reload_item(), and reload_wielded().
| void game::reload_item | ( | ) |
Definition at line 10015 of file game.cpp.
References _, add_msg(), good, inv_map_splice(), Character::rate_action_reload(), reload(), and u.
Referenced by do_regular_action().
| void game::reload_npcs | ( | ) |
Unloads, then loads the NPCs.
Definition at line 1264 of file game.cpp.
References load_npcs(), and unload_npcs().
Referenced by load().
| void game::reload_tileset | ( | ) |
Definition at line 697 of file game.cpp.
References _, g, popup(), and use_far_tiles.
Referenced by do_regular_action().
| void game::reload_weapon | ( | bool | try_everything = true | ) |
Definition at line 10039 of file game.cpp.
References a, b, Character::find_reloadables(), Character::get_wielded_item(), and u.
Referenced by do_regular_action().
| void game::reload_wielded | ( | bool | prompt = false | ) |
Definition at line 10029 of file game.cpp.
References _, add_msg(), Character::get_wielded_item(), item::is_reloadable(), Pickup::prompt, reload(), and u.
Referenced by do_regular_action().
| vehicle * game::remoteveh | ( | ) |
Returns the current remotely controlled vehicle.
Definition at line 2611 of file game.cpp.
References bio_remote, vehicle::fuel_left(), Creature::get_value(), Character::has_active_bionic(), Character::has_active_item(), itype_battery, itype_remotevehcontrol, m, remoteveh_cache, remoteveh_cache_time, calendar::turn, u, map::veh_at(), veh_pointer_or_null(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by control_vehicle().
| void game::remove_npc | ( | character_id const & | id | ) |
| void game::remove_npc_follower | ( | const character_id & | id | ) |
Remove follower id from follower set.
Definition at line 1731 of file game.cpp.
References avatar::follower_ids, follower_ids, and u.
Referenced by cleanup_dead().
| void game::remove_zombie | ( | const monster & | critter | ) |
Definition at line 5285 of file game.cpp.
References critter_tracker.
Referenced by despawn_monster(), and start_game().
|
private |
Definition at line 8278 of file game.cpp.
References _, c_light_gray, c_light_green, c_white, catacurses::getmaxx(), LINE_OOXX, LINE_OXOX, LINE_OXXO, LINE_XOXO, LINE_XOXX, LINE_XXXO, mvwprintz(), mvwputch(), point, point_zero, math_opers::pos(), sFilter, shortcut_print(), TERMX, TERMY, utf8_width(), and wprintz().
Referenced by list_items().
| void game::reset_light_level | ( | ) |
Definition at line 4458 of file game.cpp.
References latest_lightlevels, and max().
Referenced by game().
|
private |
Definition at line 3305 of file game.cpp.
References npc::add_new_mission(), npc::chatbin, dialogue_chatbin::clear_all(), faction_no_faction, overmapbuffer::find_npc(), follower_ids, Character::getID(), Creature::global_omt_location(), npc::mission, NPC_MISSION_NULL, NPCATT_NULL, npc::op_of_u, ORIGIN_ANY_NPC, overmap_buffer, mission::reserve_random(), npc::set_attitude(), and npc::set_fac().
| void game::reset_zoom | ( | ) |
Revives a corpse at given location.
The monster type and some of its properties are deducted from the corpse. If reviving succeeds, the location is guaranteed to have a new monster there (see creature_at).
| p | The place where to put the revived monster. |
| it | The corpse item, it must be a valid corpse (see item::is_corpse). |
Definition at line 5533 of file game.cpp.
Definition at line 5538 of file game.cpp.
References Creature::add_effect(), monster::ammo, debugmsg, effect_downed, flag_FIELD_DRESS, flag_FIELD_DRESS_FAILED, flag_QUARTERED, g, monster::get_hp(), item::get_mtype(), item::get_var(), item::has_flag(), item::has_var(), mtype::id, monster::init_from_item(), item::is_corpse(), mtype_id, monster::no_extra_death_drops, and place_critter_around().
| std::optional< std::vector< tripoint_bub_ms > > game::safe_route_to | ( | Character & | who, |
| const tripoint_bub_ms & | target, | ||
| int | threshold, | ||
| const std::function< void(const std::string &msg)> & | report | ||
| ) | const |
attempt to find a safe route (avoids tiles dangerous to 'who').
| who | character to use for evaluating danger tiles and pathfinding start position |
| target | pathfinding destination tile |
| threshold | distance in tiles from target that is considered "arrived" at destination |
| report | when pathfinding fails triggers this function with a translated error string as parameter |
Definition at line 7588 of file game.cpp.
References _, a, b, get_map, Character::get_pathfinding_settings(), is_dangerous_tile(), points_in_radius(), map::points_in_radius(), Creature::pos_bub(), coords::coord_point_mut< Point, Subpoint, InBounds >::raw(), rl_dist(), rl_dist_exact(), map::route(), and Character::sees().
Referenced by list_items(), look_around(), and try_get_left_click_action().
| bool game::save | ( | ) |
Returns false if saving failed.
Definition at line 3472 of file game.cpp.
References _, base64_encode(), debugmsg, events(), save_t::from_save_id(), game_save, get_auto_notes_settings(), get_auto_pickup(), zone_manager::get_manager(), get_safemode(), avatar::get_save_id(), Character::name, popup(), auto_notes::auto_note_settings::save(), save_achievements(), auto_pickup::player_settings::save_character(), safemode::save_character(), save_factions_missions_npcs(), save_maps(), save_player_data(), zone_manager::save_zones(), event_bus::send(), uistatedata::serialize(), time_of_last_load, time_played_at_last_load, u, uistate, PATH_INFO::world_base_save_path(), PATH_INFO::world_base_save_path_path(), world_generator, and write_to_file().
Referenced by do_regular_action(), quicksave(), and zones_manager().
|
private |
Definition at line 3375 of file game.cpp.
References _, PATH_INFO::achievementdir(), assure_dir_exist(), c, D_ERROR, dbg, debugmsg, get_achievements, get_options(), get_player_character, character_id::get_value(), Character::getID(), options_manager::has_option(), Character::name, to_string(), u, achievements_tracker::write_json_achievements(), and write_to_file().
Referenced by save().
Turns Broken Cyborg monster into Cyborg NPC via surgery.
Definition at line 5580 of file game.cpp.
References _, abs(), add_msg(), bionic_success_chance(), Character::bionics_adjusted_skill(), item::damage(), item::damage_level(), effect_downed, get_avatar, get_map, map::i_rem(), overmapbuffer::insert_npc(), load_npcs(), m, m_bad, m_good, m_info, min(), item::mod_damage(), npc_template_cyborg_rescued, overmap_buffer, popup(), query_yn(), rng(), and sqrt().
|
private |
Definition at line 3327 of file game.cpp.
References _, SAVE_MASTER(), serialize_master(), PATH_INFO::world_base_save_path(), and write_to_file().
Referenced by save().
|
private |
Definition at line 3335 of file game.cpp.
References _, m, MAPBUFFER, overmap_buffer, popup(), map::save(), overmapbuffer::save(), and mapbuffer::save().
Referenced by save().
|
private |
Definition at line 3348 of file game.cpp.
References _, avatar::get_avatar_diary(), memorial(), PATH_INFO::player_base_save_path(), memorial_logger::save(), SAVE_EXTENSION(), SAVE_EXTENSION_LOG(), SAVE_EXTENSION_SHORTCUTS(), avatar::save_map_memory(), serialize(), diary::store(), u, and write_to_file().
Referenced by save().
| void game::serialize | ( | std::ostream & | fout | ) |
Saving and loading functions.
Definition at line 83 of file savegame.cpp.
References achievements_tracker_ptr, auto_travel_mode, bVMonsterLookFire, queued_eoc::context, critter_tracker, driving_view_offset, queued_eocs::empty(), JsonOut::end_array(), JsonOut::end_object(), queued_eoc::eoc, map::get_abs_sub(), global_variables_instance, inactive_global_effect_on_condition_vector, calendar::initial_season, kill_tracker_ptr, m, JsonOut::member(), mostseen, queued_eocs::pop(), queued_global_effect_on_conditions, safe_mode, savegame_version, scent, scent_map::serialize(), Messages::serialize(), global_variables::serialize(), JsonOut::start_array(), JsonOut::start_object(), calendar::start_of_cataclysm, calendar::start_of_game, stats_tracker_ptr, queued_eoc::time, queued_eocs::top(), calendar::turn, turnssincelastmon, u, unique_npcs, Character::view_offset, coords::coord_point_mut< Point, Subpoint, InBounds >::x(), tripoint::x, coords::coord_point_mut< Point, Subpoint, InBounds >::y(), tripoint::y, coords::coord_point_mut< Point, Subpoint, InBounds >::z(), and tripoint::z.
Referenced by save_player_data().
|
private |
Definition at line 1555 of file savegame.cpp.
References JsonError::c_str(), debugmsg, JsonOut::end_object(), faction_manager_ptr, JsonOut::member(), next_mission_id, next_npc_id, overmap_buffer, SAVE_MASTER(), savegame_version, seed, mission::serialize_all(), weather_manager::serialize_all(), timed_event_manager::serialize_all(), overmapbuffer::serialize_overmap_global_state(), and JsonOut::start_object().
Referenced by save_factions_missions_npcs().
| void game::set_critter_died | ( | ) |
If invoked, dead will be cleaned this turn.
Definition at line 1602 of file game.cpp.
References critter_died.
| void game::set_driving_view_offset | ( | const point & | p | ) |
Definition at line 1415 of file game.cpp.
References driving_view_offset, u, Character::view_offset, point::x, tripoint::x, point::y, and tripoint::y.
Referenced by calc_driving_offset().
| void game::set_npcs_dirty | ( | ) |
If invoked, NPCs will be reloaded before next turn.
Definition at line 1597 of file game.cpp.
References npcs_dirty.
| void game::set_safe_mode | ( | safe_mode_type | mode | ) |
Definition at line 10367 of file game.cpp.
References safe_mode, and safe_mode_warning_logged.
Referenced by do_regular_action(), and mon_info_update().
| void game::set_zoom | ( | int | level | ) |
| void game::setremoteveh | ( | vehicle * | veh | ) |
Sets the current remotely controlled vehicle.
Definition at line 2634 of file game.cpp.
References bio_remote, debugmsg, vehicle::global_pos3(), Character::has_active_bionic(), Character::has_active_item(), itype_remotevehcontrol, remoteveh_cache, remoteveh_cache_time, Creature::remove_value(), Creature::set_value(), calendar::turn, u, tripoint::x, tripoint::y, and tripoint::z.
| void game::setup | ( | ) |
Definition at line 764 of file game.cpp.
References _, achievements_tracker_ptr, calendar::before_time_starts, bVMonsterLookFire, character_id, avatar::character_mood_face(), stats_tracker::clear(), effect_on_conditions::clear(), mission::clear_all(), global_variables::clear_global_values(), Messages::clear_messages(), clear_zombies(), critter_tracker, eoc_events_ptr, faction_manager_ptr, follower_ids, get_globals, panel_manager::get_manager(), get_weather, panel_manager::init(), kill_tracker_ptr, load_core_data(), load_world_modfiles(), m, map, new_game, next_mission_id, next_npc_id, weather_manager::nextweather, popup(), QUIT_NO, ui_manager::redraw(), refresh_display(), remoteveh_cache, remoteveh_cache_time, scent_map::reset(), sounds::reset_sounds(), scent, SCT, calendar::set_eternal_day(), calendar::set_eternal_night(), calendar::set_eternal_season(), calendar::set_location(), calendar::set_season_length(), calendar::start_of_game, stats(), timed_events, turnssincelastmon, u, unique_npcs, uquit, scrollingcombattext::vSCT, weather, WEATHER_CLEAR(), weather_manager::weather_id, WEATHER_NULL(), and weather_manager::weather_override.
| template shared_ptr_fast< npc > game::shared_from< npc > | ( | const T & | critter | ) |
Returns a shared pointer to the given critter (which can be of any of the subclasses of Creature).
The function may return an empty pointer if the given critter is not stored anywhere (e.g. it was allocated on the stack, not stored in the critter_tracker nor in active_npc nor is it u).
Definition at line 5125 of file game.cpp.
References critter_tracker, u, and u_shared_ptr.
Referenced by list_monsters(), mon_info_update(), and validate_mounted_npcs().
| void game::shift_destination_preview | ( | const point & | delta | ) |
Definition at line 13274 of file game.cpp.
References destination_preview.
|
private |
Shift all active monsters, the shift vector is the number of shifted submaps.
Monsters that are outside of the reality bubble after shifting are despawned. Note on z-levels: this works with vertical shifts, but currently all monsters are despawned upon a vertical shift.
Definition at line 12776 of file game.cpp.
References all_monsters(), despawn_monster(), map::inbounds(), m, point_zero, shift, and tripoint_zero.
Referenced by update_map().
| bool game::slip_down | ( | climb_maneuver | maneuver, |
| climbing_aid_id | aid = climbing_aid_id::NULL_ID(), |
||
| bool | show_chance_messages = true |
||
| ) |
Checks if player is able to successfully climb to/from some terrain and not slip down.
| maneuver | Type & direction of climbing maneuver. Affects chance and whether traps trigger. |
| aid | Identifies the object, terrain or ability being used to climb. See climbing.h. |
| show_chance_messages | If true, adds explanatory messages to the log when calculating fall chance. |
Definition at line 13417 of file game.cpp.
References _, add_msg(), map::creature_on_trap(), m, m_bad, over_obstacle, slip_down_chance(), u, and x_in_y().
Referenced by vertical_move().
| int game::slip_down_chance | ( | climb_maneuver | maneuver, |
| climbing_aid_id | aid = climbing_aid_id::NULL_ID(), |
||
| bool | show_chance_messages = true |
||
| ) |
Calculates the chance that slip_down will return true.
| maneuver | Type & direction of climbing maneuver. Affects chance and whether traps trigger. |
| affordance | Identifies the object, terrain or ability being used to climb. See climbing.h. |
| show_messages | If true, outputs climbing chance factors to the message log as if attempting. |
Definition at line 13281 of file game.cpp.
References _, add_msg(), add_msg_debug, body_part_name(), bp, character_modifier_slip_prevent_mod, climbing_aid_default, Character::dex_cur, debugmode::DF_GAME, body_part_type::foot, Creature::get_all_body_parts_of_type(), Character::get_modifier(), Creature::get_part(), Creature::get_part_wetness(), Character::get_stamina(), Character::get_stamina_max(), bodypart::get_wetness_percentage(), body_part_type::hand, Character::has_proficiency(), Character::has_trait(), string_id< T >::is_null(), m_info, max(), string_id< T >::obj(), primary_type, proficiency_prof_parkour, roll_remainder(), climbing_aid::slip_chance_mod, Character::str_cur, units::to_gram(), trait_BADKNEES, u, Character::weight_capacity(), and Character::weight_carried().
Referenced by climb_down_using(), and slip_down().
| bool game::spawn_hallucination | ( | const tripoint & | p | ) |
Spawns a hallucination at a determined position.
Attempts to spawn a hallucination at given location.
Returns false if the hallucination couldn't be spawned for whatever reason, such as a monster already in the target square.
Definition at line 5343 of file game.cpp.
References MonsterGenerator::generator(), get_creature_tracker, get_map, get_player_character, oter_t::get_static_spawns(), MonsterGenerator::get_valid_hallucination(), MonsterGroupManager::GetRandomMonsterFromGroup(), overmap_spawns::group, overmapbuffer::insert_npc(), string_id< T >::is_null(), load_npcs(), NC_HALLU, one_in(), overmap_buffer, overmapbuffer::ter(), and TFLAG_NO_FLOOR.
| bool game::spawn_hallucination | ( | const tripoint & | p, |
| const mtype_id & | mt, | ||
| std::optional< time_duration > | lifespan | ||
| ) |
Spawns a hallucination at a determined position of a given monster.
Attempts to spawn a hallucination at given location.
Returns false if the hallucination couldn't be spawned for whatever reason, such as a monster already in the target square.
Definition at line 5383 of file game.cpp.
References critter_tracker, get_creature_tracker, get_map, and TFLAG_NO_FLOOR.
| bool game::spawn_npc | ( | const tripoint & | p, |
| const string_id< npc_template > & | npc_class, | ||
| std::string & | unique_id, | ||
| std::vector< trait_id > & | traits, | ||
| std::optional< time_duration > | lifespan | ||
| ) |
Spawns a npc at a determined position.
Definition at line 5405 of file game.cpp.
References add_msg_debug, debugmode::DF_NPC, g, get_creature_tracker, get_map, overmapbuffer::insert_npc(), load_npcs(), and overmap_buffer.
| spell_events & game::spell_events_subscriber | ( | ) |
Definition at line 3467 of file game.cpp.
References spell_events_ptr.
| void game::start_calendar | ( | ) |
Definition at line 13102 of file game.cpp.
References calendar::initial_season, NUM_SEASONS, scen, calendar::start_of_cataclysm, scenario::start_of_cataclysm(), calendar::start_of_game, scenario::start_of_game(), calendar::turn, and calendar::turn_zero.
Referenced by start_game().
|
private |
Definition at line 850 of file game.cpp.
References _, city_reference::abs_sm_pos, start_location::add_map_extra(), add_msg_debug, avatar::add_profession_items(), all_monsters(), mission::assign(), assign_npc_id(), avatar_enters_omt, calendar::before_time_starts, map::build_map_cache(), start_location::burn(), Character::calc_mutation_levels(), character_id, auto_notes::auto_note_settings::clear(), item_stack::clear(), mapbuffer::clear(), overmapbuffer::clear(), auto_pickup::player_settings::clear_character_rules(), safemode::clear_character_rules(), map::clear_path(), overmapbuffer::closest_city(), create_starting_npcs(), critter_tracker, Character::custom_profession, debugmsg, auto_notes::auto_note_settings::default_initialize(), debugmode::DF_GAME, Character::drench_mut_calc(), effect_pet, overmapbuffer::find_closest(), start_location::find_player_initial_location(), game_avatar_new, game_start, gamemode, map::get_abs_sub(), city::get_all(), get_auto_notes_settings(), get_auto_pickup(), get_cur_om(), get_event_bus, Creature::get_location(), scenario::get_map_extra(), get_player_character, get_safemode(), get_scenario, Character::get_stamina_max(), map::get_vehicles(), Character::getID(), map::getlocal(), getVersionString(), Creature::global_omt_location(), GROUP_BLACK_ROAD, HALF_MAPSIZE, start_location::handle_heli_crash(), scenario::has_flag(), scenario::has_map_extra(), Character::hobbies, profession::ident(), init_autosave(), Character::inv_dump(), overmap::invalid_tripoint, map::invalidate_map_cache(), vpart_reference::items(), Character::last_climate_control_ret, safemode::load_global(), load_map(), load_master(), effect_on_conditions::load_new_character(), load_npcs(), m, Character::male, MAPBUFFER, Character::migrate_items_to_storage(), profession::missions(), scenario::missions(), mostseen, Character::name, om_direction::name(), new_game, Character::next_climate_control_check, weather_manager::nextweather, om_direction::north, string_id< T >::obj(), coords::om, omt, overmap_buffer, OVERMAP_DEPTH, OVERMAP_HEIGHT, overmap_special_world, place_critter_around(), start_location::place_player(), overmap::place_special_forced(), place_vehicle_nearby(), point, popup(), Creature::pos(), math_opers::pos(), start_location::prepare_map(), Character::process_turn(), Character::prof, query_yn(), random_entry(), Character::random_start_location, scenario::random_start_location(), coords::coord_point_mut< Point, Subpoint, InBounds >::raw(), ui_manager::redraw(), refresh_display(), remove_zombie(), mission::reserve_new(), cata::hash64_detail::ret, overmapbuffer::reveal(), overmapbuffer::reveal_route(), rl_dist(), rng_bits(), safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, scen, overmap_ui::search(), seed, event_bus::send(), Creature::set_moves(), start_location::set_parameters(), Character::set_stamina(), Character::setID(), Creature::setpos(), map::spawn_monsters(), SPRING_TEMPERATURE, start_calendar(), Character::start_location, Character::starting_city, avatar::starting_pets, avatar::starting_vehicle, scenario::surround_groups(), start_location::surround_with_monsters(), weather_manager::temperature, overmapbuffer::ter(), time_of_last_load, time_played_at_last_load, calendar::turn, u, update_map(), weather_manager::update_weather(), VPFLAG_CONTROLS, weather, Character::world_origin, coords::coord_point< Point, Origin, Scale, InBounds >::xy(), and coords::coord_point_mut< Point, Subpoint, InBounds >::z().
| void game::start_hauling | ( | const tripoint & | pos | ) |
Definition at line 12339 of file game.cpp.
References Character::assign_activity(), filter, map::get_haulable_items(), Character::haul_list, Character::hauling_filter, Character::is_autohauling(), item_filter_from_string(), m, math_opers::pos(), Character::stop_hauling(), Character::suppress_autohaul, Character::trim_haul_list(), and u.
Referenced by vertical_move(), and walk_move().
| stats_tracker & game::stats | ( | ) |
Definition at line 3427 of file game.cpp.
References stats_tracker_ptr.
Referenced by death_screen(), load(), and setup().
Swaps positions of two creatures.
Definition at line 5435 of file game.cpp.
References a, b, map::board_vehicle(), creature_tracker::creature_at(), critter_tracker, debugmsg, get_creature_tracker, Character::in_vehicle, Creature::is_avatar(), Creature::is_monster(), m, optional_vpart_position::part_with_feature(), Creature::pos(), second, Creature::setpos(), temp, map::unboard_vehicle(), map::veh_at(), VPFLAG_BOARDABLE, and walk_move().
Referenced by npc_menu().
| bool game::take_screenshot | ( | ) | const |
Saves a screenshot of the current viewport, as a PNG file.
Filesystem location is derived from the current world and character.
false). A window (more precisely, a viewport) must already exist and the SDL renderer must be valid. true if the screenshot generation was successful, false otherwise. Definition at line 8270 of file game.cpp.
| bool game::take_screenshot | ( | const std::string & | file_path | ) | const |
Saves a screenshot of the current viewport, as a PNG file, to the given location.
| file_path | A full path to the file where the screenshot should be saved. |
false). A window (more precisely, a viewport) must already exist and the SDL renderer must be valid. true if the screenshot generation was successful, false otherwise. | void game::temp_exit_fullscreen | ( | ) |
Definition at line 742 of file game.cpp.
References fullscreen, toggle_fullscreen(), and was_fullscreen.
Referenced by look_around().
| void game::toggle_debug_hour_timer | ( | ) |
Definition at line 12970 of file game.cpp.
References game::debug_hour_timer::toggle().
Referenced by do_regular_action(), and look_around().
| void game::toggle_fullscreen | ( | ) |
Definition at line 654 of file game.cpp.
References fullscreen, and mark_main_ui_adaptor_resize().
Referenced by do_regular_action(), reenter_fullscreen(), and temp_exit_fullscreen().
| void game::toggle_language_to_en | ( | ) |
| void game::toggle_pixel_minimap | ( | ) | const |
Definition at line 664 of file game.cpp.
References mark_main_ui_adaptor_resize(), pixel_minimap_option, and w_pixel_minimap.
Referenced by do_regular_action(), and look_around().
|
private |
Definition at line 2655 of file game.cpp.
References act, ACTION_NULL, add_msg(), Character::clear_destination(), destination_preview, Character::get_next_auto_move_direction(), safe_route_to(), Character::set_destination(), u, and coords::coord_point< Point, Origin, Scale, InBounds >::xy().
Referenced by handle_action().
|
private |
Definition at line 2689 of file game.cpp.
References _, act, ACTION_CLOSE, ACTION_EXAMINE, ACTION_FIRE, ACTION_PICKUP, add_msg(), Character::clear_destination(), map::close_door(), destination_preview, get_creature_tracker, Character::get_wielded_item(), item::is_gun(), map::is_outside(), m, m_info, Creature::pos(), Creature::pos_bub(), Creature::posz(), Character::sees(), square_dist(), u, and coords::coord_point< Point, Origin, Scale, InBounds >::xy().
Referenced by handle_action().
| void game::unique_npc_despawn | ( | const std::string & | id | ) |
Definition at line 3462 of file game.cpp.
References unique_npcs.
| bool game::unique_npc_exists | ( | const std::string & | id | ) |
Definition at line 3457 of file game.cpp.
References unique_npcs.
Referenced by get_unique_npc_location().
|
private |
Definition at line 9329 of file game.cpp.
References _, choose_adjacent(), Character::drop(), u, and game_menus::inv::unload_container().
Referenced by do_regular_action().
|
private |
Unloads all NPCs.
If you call this you must later call load_npcs, lest caches get rather confused. The tests used to call this a lot when they shouldn't. It is now private to reduce the chance of similar problems in the future.
Definition at line 1243 of file game.cpp.
References critter_tracker, and npc::on_unload().
Referenced by place_player_overmap(), and reload_npcs().
| void game::unserialize | ( | std::istream & | fin, |
| const cata_path & | path | ||
| ) |
Definition at line 205 of file savegame.cpp.
References achievements_tracker_ptr, auto_travel_mode, bVMonsterLookFire, JsonError::c_str(), chkversion(), context, critter_tracker, debugmsg, Messages::deserialize(), scent_map::deserialize(), driving_view_offset, json_loader::from_path_at_offset(), JsonObject::get_array(), JsonObject::get_int(), JsonValue::get_object(), global_variables_instance, JsonObject::has_null(), inactive_global_effect_on_condition_vector, calendar::initial_season, inp_mngr, kill_tracker_ptr, load_map(), mostseen, coords::project_combine(), input_manager::pump_events(), queued_eocs::push(), queued_global_effect_on_conditions, JsonObject::read(), scent_map::reset(), safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, scent, SPRING, calendar::start_of_cataclysm, calendar::start_of_game, stats_tracker_ptr, temp, calendar::turn, turnssincelastmon, u, unique_npcs, global_variables::unserialize(), Character::view_offset, coords::coord_point_mut< Point, Subpoint, InBounds >::x(), tripoint::x, coords::coord_point_mut< Point, Subpoint, InBounds >::y(), tripoint::y, coords::coord_point_mut< Point, Subpoint, InBounds >::z(), and tripoint::z.
Referenced by load().
| void game::unserialize_master | ( | const cata_path & | file_name, |
| std::istream & | fin | ||
| ) |
Definition at line 1408 of file savegame.cpp.
References JsonError::c_str(), chkversion(), debugmsg, json_loader::from_path_at_offset(), SAVE_MASTER(), and savegame_loading_version.
Referenced by load_master().
| void game::unserialize_master | ( | const JsonValue & | jv | ) |
Definition at line 1420 of file savegame.cpp.
References character_id::deserialize(), overmapbuffer::deserialize_overmap_global_state(), overmapbuffer::deserialize_placed_unique_specials(), faction_manager_ptr, JsonValue::get_int(), om_direction::name(), next_mission_id, next_npc_id, overmap_buffer, JsonValue::read(), seed, mission::unserialize_all(), timed_event_manager::unserialize_all(), and weather_manager::unserialize_all().
Definition at line 12615 of file game.cpp.
References Creature::posx(), Creature::posy(), point::x, and point::y.
Referenced by fling_creature(), load(), place_player(), start_game(), and vertical_move().
| point game::update_map | ( | int & | x, |
| int & | y, | ||
| bool | z_level_changed = false |
||
| ) |
Definition at line 12621 of file game.cpp.
References map::build_map_cache(), clamp(), critter_tracker, map::get_abs_sub(), HALF_MAPSIZE_X, HALF_MAPSIZE_Y, map::invalidate_map_cache(), load_npcs(), m, MAPSIZE_X, MAPSIZE_Y, OVERMAP_DEPTH, OVERMAP_HEIGHT, point, point_zero, scent, SEEX, SEEY, Creature::setpos(), shift, map::shift(), scent_map::shift(), Character::shift_destination(), shift_monsters(), sm_to_ms_copy(), map::spawn_monsters(), tripoint, u, update_overmap_seen(), and coords::coord_point_mut< Point, Subpoint, InBounds >::z().
| void game::update_overmap_seen | ( | ) |
Definition at line 12711 of file game.cpp.
References oter_t::get_see_cost(), Creature::global_omt_location(), light_level(), line, line_to(), max(), overmap_buffer, Character::overmap_sight_range(), points_in_radius(), Creature::posz(), coords::coord_point_mut< Point, Subpoint, InBounds >::raw(), overmapbuffer::set_seen(), sqrt(), overmapbuffer::ter(), trigdist, u, coords::coord_point_mut< Point, Subpoint, InBounds >::x(), point::x, coords::coord_point< Point, Origin, Scale, InBounds >::xy(), coords::coord_point_mut< Point, Subpoint, InBounds >::y(), point::y, and coords::coord_point_mut< Point, Subpoint, InBounds >::z().
Referenced by place_player_overmap(), and update_map().
| void game::update_unique_npc_location | ( | const std::string & | id, |
| point_abs_om | loc | ||
| ) |
Definition at line 3442 of file game.cpp.
References base_camps::id, and unique_npcs.
| bool game::update_zombie_pos | ( | const monster & | critter, |
| const tripoint_abs_ms & | old_pos, | ||
| const tripoint_abs_ms & | new_pos | ||
| ) |
Redirects to the creature_tracker update_pos() function.
Definition at line 5279 of file game.cpp.
References critter_tracker.
| void game::use_computer | ( | const tripoint & | p | ) |
Checks to see if a player can use a computer (not illiterate, etc.) and uses if able.
Definition at line 5084 of file game.cpp.
References _, add_msg(), map::computer_at(), D_ERROR, dbg, debugmsg, effect_contacts, effect_transition_contacts, eoc, computer::eocs, flag_FIX_FARSIGHT, get_avatar, get_talker_for(), Creature::has_effect(), Character::has_flag(), map::has_flag(), Character::has_trait(), Character::is_blind(), json_flag_HYPEROPIC, m, m_bad, m_info, STATIC, TFLAG_CONSOLE, trait_ILLITERATE, u, computer_session::use(), Character::worn_with_flag(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by examine().
| void game::validate_camps | ( | ) |
validate camps to ensure they are on the overmap list
Definition at line 1803 of file game.cpp.
References _, overmapbuffer::add_camp(), basecamp::camp_omt_pos(), map::hoist_submap_camp(), basecamp::is_valid(), m, overmap_buffer, Creature::pos(), map::remove_submap_camp(), basecamp::set_name(), and u.
Referenced by load().
| void game::validate_linked_vehicles | ( | ) |
validate towed vehicles so they get linked up again after a load
Definition at line 1745 of file game.cpp.
References map::get_vehicles(), m, towing_data::other_towing_point, towing_data::set_towing(), vehicle::tow_data, tripoint_zero, map::veh_at(), and veh_pointer_or_null().
Referenced by load().
| void game::validate_mounted_npcs | ( | ) |
Definition at line 1760 of file game.cpp.
References Creature::add_effect(), all_monsters(), character_id, effect_ridden, effect_riding, g, m, Character::mounted_creature, Creature::setpos(), and shared_from().
Referenced by load().
| void game::validate_npc_followers | ( | ) |
validate list of followers to account for overmap buffers
Definition at line 1779 of file game.cpp.
References add_npc_follower(), avatar::follower_ids, get_npcs_if(), overmapbuffer::get_npcs_near_player(), Character::getID(), npc::is_player_ally(), overmap_buffer, u, and update_faction_api().
Referenced by load().
| void game::vertical_move | ( | int | z, |
| bool | force, | ||
| bool | peeking = false |
||
| ) |
Moves the player vertically.
If force == true then they are falling. If peeking == true, forbids some exotic movement options
Definition at line 11966 of file game.cpp.
References _, abs(), add_msg(), add_msg_debug, all_monsters(), cata_event_dispatch::avatar_moves(), Character::burn_energy_all(), monster::check_mech_powered(), climbing_aid_ability_WALL_CLING, climbing_aid_default, climbing_aid_furn_CLIMBABLE, Character::climbing_cost(), creature_tracker::creature_at(), map::creature_on_trap(), Character::current_movement_mode(), debugmode::DF_GAME, displace(), down, effect_gliding, effect_led_by_leash, effect_ridden, effect_tied, EXTRA_EXERCISE, find_empty_spot_nearby(), find_or_make_stairs(), flag_FLOTATION, force, monster::friendly, furn_f_rope_up, furn_f_web_up, map::furn_set(), map::get_abs_sub(), get_creature_tracker, Creature::get_location(), get_map, Character::get_name(), monster::get_name(), Character::get_wielded_item(), Character::get_working_arm_count(), map::getabs(), avatar::grab(), Character::grab_point, Creature::has_effect(), Character::has_flag(), monster::has_flag(), map_data_common_t::has_flag(), map::has_flag(), map::has_floor_or_support(), map::invalidate_map_cache(), Creature::is_avatar(), npc::is_enemy(), Character::is_hauling(), Character::is_mounted(), item::is_two_handed(), Creature::is_underwater(), map::is_wall_adjacent(), itype_manhole_cover, itype_swim_fins, json_flag_CLIMB_NO_LADDER, json_flag_WALL_CLING, json_flag_WEB_RAPPEL, m, m_bad, m_info, MAX_RECOIL, move_mode::mech_power_use(), Creature::mod_moves(), mon_flag_RIDEABLE_MECH, Character::mounted_creature, monster::mounted_player, npc::move_away_from(), move_cost, Character::move_effects(), NONE, OVERMAP_DEPTH, OVERMAP_HEIGHT, map::passable(), point, point_selection_menu(), map::points_in_radius(), Creature::pos(), Creature::posx(), Creature::posy(), Creature::posz(), query_yn(), Character::recoil, rl_dist(), rng(), Character::set_activity_level(), Creature::set_moves(), Character::set_underwater(), Creature::setpos(), Character::shoe_type_count(), slip_down(), sm_to_ms_copy(), map::spawn_item(), start_hauling(), Character::swim_speed(), map::ter(), map::ter_set(), ter_t_manhole, ter_t_manhole_cover, TFLAG_CLIMB_ADJACENT, TFLAG_DEEP_WATER, TFLAG_DIFFICULT_Z, TFLAG_GOES_DOWN, TFLAG_GOES_UP, TFLAG_LADDER, TFLAG_NO_FLOOR_WATER, TFLAG_SWIMMABLE, TFLAG_WATER_CUBE, item::tname(), tr_ledge, tripoint_zero, u, Character::unwield(), up, update_map(), monster::use_mech_power(), vertical_shift(), Character::worn_with_flag(), tripoint::x, tripoint::y, and coords::coord_point_mut< Point, Subpoint, InBounds >::z().
Referenced by do_regular_action(), and peek().
| void game::vertical_notes | ( | int | z_before, |
| int | z_after | ||
| ) |
Add goes up/down auto_notes (if turned on)
Definition at line 12575 of file game.cpp.
References _, overmapbuffer::add_note(), debugmsg, Creature::global_omt_location(), oter_t::has_flag(), overmapbuffer::has_note(), map::inbounds_z(), known_down, known_up, m, overmap_buffer, points_in_radius(), overmapbuffer::seen(), overmapbuffer::set_seen(), string_format(), overmapbuffer::ter(), and u.
Referenced by vertical_shift().
| bool game::vertical_shift | ( | int | z_after | ) |
Actual z-level movement part of vertical_move.
Doesn't include stair finding, traps etc. Returns true if the z-level changed.
Definition at line 12554 of file game.cpp.
References debugmsg, Creature::get_location(), m, Creature::move_to(), OVERMAP_DEPTH, OVERMAP_HEIGHT, Creature::posz(), scent_map::reset(), scent, u, vertical_notes(), map::vertical_shift(), and coords::coord_point< Point, Origin, Scale, InBounds >::xy().
Referenced by place_player(), and vertical_move().
| void game::void_async_anim_curses | ( | ) |
Definition at line 3933 of file game.cpp.
References async_anim_layer_curses.
| void game::void_blink_curses | ( | ) |
| bool game::walk_move | ( | const tripoint & | dest, |
| bool | via_ramp = false, |
||
| bool | furniture_move = false |
||
| ) |
TODO: This should really use the mounted creatures stamina, if mounted. Monsters don't currently have stamina however. For the time being just don't burn players stamina when mounted.
Dexterity decreases chance of tentacles getting stuck to the ground Intelligence decreases chance of tentacles getting stuck to the groundDefinition at line 10533 of file game.cpp.
References _, Character::activity_level(), add_msg(), map::ambient_light_at(), cata_event_dispatch::avatar_moves(), Character::burn_move_stamina(), c_light_gray, ceil(), monster::check_mech_powered(), map::combined_movecost(), Character::current_movement_mode(), Character::dex_cur, sfx::do_obstacle(), draw_async_anim(), effect_took_xanax, enumerate_as_string(), fd_fire, iexamine::fungus(), map::furn(), FURNITURE, get_dangerous_tile(), map::get_field_age(), map::get_field_intensity(), avatar::get_grab_type(), get_map, Creature::get_moves(), monster::get_name(), Character::get_size(), monster::get_size(), Character::get_weight(), map::getabs(), avatar::grab(), Character::grab_point, grabbed_move(), Creature::has_effect(), Character::has_flag(), monster::has_flag(), map::has_flag(), map::has_flag_ter(), map::has_flag_ter_or_furn(), map::has_furn(), Character::has_proficiency(), Character::has_trait(), int_id< T >::id(), map::impassable(), Character::int_cur, Character::is_barefoot(), Character::is_crouching(), is_dangerous_tile(), Character::is_hauling(), Character::is_mounted(), Character::is_running(), json_flag_NYCTOPHOBIA, avatar::last_pocket_noise, Character::last_target_pos, iexamine::ledge(), LIGHT_AMBIENT_LIT, m, m_bad, m_good, m_warning, Character::make_clatter_sound(), Character::make_footstep_noise(), max(), MAX_RECOIL, move_mode::mech_power_use(), medium, Creature::mod_moves(), Character::mod_sleepiness(), mon_flag_RIDEABLE_MECH, Character::mounted_creature, map::move_cost(), monster::move_effects(), Character::move_in_vehicle(), map_data_common_t::movecost, map::name(), NONE, int_id< T >::obj(), on_move_effects(), one_in(), optional_vpart_position::part_displayed(), place_player(), Creature::pos(), Creature::posx(), Creature::posy(), Creature::posz(), proficiency_prof_parkour, prompt_dangerous_tile(), Character::recoil, map::remove_field(), Character::run_cost(), map::set_field_age(), map::set_field_intensity(), Character::set_underwater(), sm_to_ms_copy(), start_hauling(), string_id< T >::str(), map::ter(), TFLAG_BARRICADABLE_DOOR, TFLAG_BARRICADABLE_DOOR_DAMAGED, TFLAG_BARRICADABLE_DOOR_REINFORCED, TFLAG_FUNGUS, TFLAG_HIDE_PLACE, TFLAG_MOUNTABLE, TFLAG_OPENCLOSE_INSIDE, TFLAG_SMALL_PASSAGE, TFLAG_SWIMMABLE, trait_LEG_TENT_BRACE, trait_M_IMMUNE, trigdist, tripoint, tripoint_zero, calendar::turn, u, map::veh_at(), veh_pointer_or_null(), VEHICLE, vehicle::wheelcache, tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
Referenced by swap_critters().
| void game::water_affect_items | ( | Character & | ch | ) | const |
Destroy / dissolve character items when in water.
Definition at line 11703 of file game.cpp.
References _, add_msg_if_player_sees(), Character::all_items_loc(), Character::disp_name(), flag_ELECTRONIC, flag_WATER_BREAK, flag_WATER_BREAK_ACTIVE, flag_WATER_DISSOLVE, fault::get_by_type(), itype_towel, itype_towel_wet, m_bad, min(), Creature::pos(), random_entry(), and units::to_milliliter().
Referenced by fling_creature().
|
private |
Definition at line 10212 of file game.cpp.
References _, add_msg(), u, and game_menus::inv::wield().
Referenced by do_regular_action(), inventory_item_menu(), and wield().
|
private |
Definition at line 10110 of file game.cpp.
References _, map::add_item(), add_msg(), Character::can_takeoff(), Character::can_unwield(), Character::can_wield(), optional_vpart_position::cargo(), item_location::character, avatar_action::check_stealing(), item_location::container, debugmsg, item::empty(), item_location::get_item(), Character::get_item_position(), item::get_use(), Character::get_wielded_item(), visitable::has_item(), Character::has_wield_conflicts(), Character::i_add(), outfit::insert_item_at_index(), item_location::invalid, avatar::invoke_item(), Character::is_wielding(), Character::is_worn(), m, m_info, item_location::map, Character::martial_arts_data, item_location::obtain(), item_location::obtain_cost(), pgettext, math_opers::pos(), item_location::position(), query_yn(), item_location::remove_item(), cata::hash64_detail::ret, item::tname(), u, Character::unwield(), map::veh_at(), item_location::vehicle, item_location::where(), wield(), avatar::wield(), Character::worn, and Character::worn_position_to_index().
| void game::write_memorial_file | ( | std::string | sLastWords | ) |
Writes information about the character out to a text file timestamped with the time of the file was made.
This serves as a record of the character's state at the time the memorial was made (usually upon death) and accomplishments in a human-readable format.
Definition at line 3532 of file game.cpp.
References _, assure_dir_exist(), c, cata_fatal, D_ERROR, dbg, debugmsg, get_options(), options_manager::has_option(), memorial(), PATH_INFO::memorialdir(), Character::name, string_format(), u, world_generator, memorial_logger::write_json_memorial(), memorial_logger::write_text_memorial(), and write_to_file().
| void game::zones_manager | ( | ) |
Definition at line 6942 of file game.cpp.
References _, action, ACTIVITY_SEARCH_DISTANCE, zone_manager::add(), add_draw_callback(), c_green, c_light_gray, c_light_green, c_white, c_yellow, zone_manager::cache_avatar_location(), calcStartPos(), center, zone_options::create(), create_zone_callback(), debug_mode, string_input_popup::description(), direction_from(), direction_name_short(), ui::omap::display_zones(), draw_scrollbar(), string_input_popup::edit(), uilist::entries, faction_id, rotatable_symbols::get(), zone_data::get_center_point(), zone_options::get_descriptions(), zone_data::get_enabled(), zone_data::get_end_point(), zone_data::get_is_personal(), zone_data::get_is_vehicle(), Creature::get_location(), zone_manager::get_manager(), zone_data::get_name(), zone_manager::get_name_from_type(), zone_data::get_options(), get_player_character, zone_data::get_start_point(), zone_data::get_type(), zone_manager::get_zones(), map::getglobal(), map::getlocal(), Creature::global_omt_location(), input_context::handle_input(), zone_options::has_options(), zone_data::has_options(), zone_manager::has_personal_zones(), invalidate_main_ui_adaptor(), look_around(), m, max(), string_input_popup::max_length(), query_popup::message(), min(), mvwprintz(), om_direction::name(), navigate_ui_list(), catacurses::newwin(), no, query_popup::on_top(), optional(), PATH_INFO::options(), point, point_south, point_zero, popup(), Creature::pos(), math_opers::pos(), look_around_result::position, Creature::posx(), Creature::posy(), Creature::posz(), zone_options::query(), uilist::query(), zone_manager::query_name(), zone_manager::query_type(), query_ynq(), quit, coords::coord_point_mut< Point, Subpoint, InBounds >::raw(), ui_manager::redraw(), input_context::register_action(), input_context::register_navigate_ui_list(), zone_manager::remove(), zone_manager::reset_disabled(), input_context::reset_timeout(), uilist::ret, rl_dist(), save(), zone_manager::save_zones(), second, zone_data::set_enabled(), zone_data::set_name(), zone_data::set_position(), input_context::set_timeout(), zone_data::set_type(), show, string_id< T >::str(), zone_manager::swap(), TERMX, TERMY, uilist::text, trig_dist(), trim_by_length(), tripoint, tripoint_zero, u, Character::view_offset, catacurses::werase(), string_input_popup::width(), catacurses::wnoutrefresh(), yes, your_fac(), zone_type_LOOT_CUSTOM, zones, zones_manager_draw_borders(), zones_manager_open, and zones_manager_shortcuts().
Referenced by do_regular_action().
| void game::zoom_in | ( | ) |
Definition at line 8171 of file game.cpp.
References tileset_zoom.
Referenced by do_regular_action(), list_items(), list_monsters(), and look_around().
| void game::zoom_in_overmap | ( | ) |
| void game::zoom_out | ( | ) |
Definition at line 8147 of file game.cpp.
References tileset_zoom.
Referenced by do_regular_action(), list_items(), list_monsters(), and look_around().
| void game::zoom_out_overmap | ( | ) |
|
friend |
|
friend |
Definition at line 389 of file game.h.
Referenced by all_creatures().
|
friend |
MAIN GAME LOOP.
Returns true if game is over (death, saved, quit, etc.).
Definition at line 440 of file do_turn.cpp.
|
friend |
|
friend |
Definition at line 13802 of file game.cpp.
Referenced by save_achievements().
|
friend |
Definition at line 13817 of file game.cpp.
Referenced by cata_event_dispatch::avatar_moves(), bury_screen(), butcher_submenu(), centerlistview(), chat(), cleanup_dead(), create_zone_callback(), draw_trail(), examine(), get_characters_if(), grabbed_veh_move(), handle_action(), open_consume_item_menu(), PATH_INFO::player_base_save_path(), PATH_INFO::player_base_save_path_path(), save_cyborg(), and use_computer().
|
friend |
Definition at line 13827 of file game.cpp.
Referenced by can_move_furniture(), can_place_monster(), can_place_npc(), disable_robot(), display_visibility(), draw_look_around_cursor(), examine(), find_empty_spot_nearby(), find_or_make_stairs(), fling_creature(), forced_door_closing(), get_player_input(), is_empty(), knockback(), look_around(), phasing_move(), place_player(), print_all_tile_info(), spawn_hallucination(), spawn_npc(), swap_critters(), try_get_right_click_action(), and vertical_move().
|
friend |
Definition at line 13832 of file game.cpp.
Referenced by cata_event_dispatch::avatar_moves(), bury_screen(), and start_game().
|
friend |
|
friend |
Definition at line 13822 of file game.cpp.
Referenced by chat(), climb_down_menu_gen(), climb_down_using(), do_regular_action(), extended_description(), find_empty_spot_nearby(), find_nearby_spawn_point(), find_or_make_stairs(), get_fire_fuel_string(), get_player_input(), grabbed_veh_move(), is_hostile_within(), is_in_dangerous_field(), load_npcs(), look_around(), safe_route_to(), save_cyborg(), spawn_hallucination(), spawn_npc(), vertical_move(), and walk_move().
|
friend |
|
friend |
Definition at line 13807 of file game.cpp.
Referenced by add_disassemblables(), bury_screen(), butcher(), chat(), climb_down_menu_gen(), climb_down_using(), control_vehicle(), display_visibility(), do_regular_action(), draw_minimap(), get_fire_fuel_string(), item_action_menu(), load(), mon_info_update(), point_selection_menu(), save_achievements(), spawn_hallucination(), start_game(), and zones_manager().
|
friend |
|
friend |
Definition at line 13842 of file game.cpp.
Referenced by start_game().
|
friend |
|
friend |
|
friend |
Definition at line 13861 of file game.cpp.
Referenced by do_regular_action(), and print_terrain_info().
|
friend |
Definition at line 13866 of file game.cpp.
Referenced by is_in_sunlight(), natural_light_level(), and setup().
|
friend |
Definition at line 388 of file game.h.
Referenced by all_monsters().
|
friend |
|
friend |
|
private |
Definition at line 1071 of file game.h.
Referenced by achievements(), death_screen(), game(), serialize(), setup(), and unserialize().
Definition at line 257 of file game.h.
Referenced by draw_async_anim_curses(), init_draw_async_anim_curses(), and void_async_anim_curses().
| bool game::auto_travel_mode = false |
Definition at line 1138 of file game.h.
Referenced by do_regular_action(), serialize(), and unserialize().
Definition at line 268 of file game.h.
Referenced by draw_blink_curses(), has_blink_curses(), init_draw_blink_curses(), and void_blink_curses().
|
private |
Definition at line 1165 of file game.h.
Referenced by list_monsters(), look_around(), serialize(), setup(), and unserialize().
|
private |
Has anything died in this turn and needs to be cleaned up?
Definition at line 1184 of file game.h.
Referenced by cleanup_dead(), and set_critter_died().
| pimpl<creature_tracker> game::critter_tracker |
Definition at line 1099 of file game.h.
Referenced by cleanup_dead(), clear_zombies(), load_npcs(), game::monster_range::monster_range(), game::npc_range::npc_range(), num_creatures(), place_critter_around(), place_critter_within(), remove_npc(), remove_zombie(), serialize(), setup(), shared_from(), spawn_hallucination(), start_game(), swap_critters(), unload_npcs(), unserialize(), update_map(), and update_zombie_pos().
|
private |
|
private |
Definition at line 1203 of file game.h.
Referenced by do_regular_action(), draw_ter(), handle_action(), shift_destination_preview(), try_get_left_click_action(), and try_get_right_click_action().
| int game::displaying_lighting_condition = 0 |
|
private |
Definition at line 1029 of file game.h.
Referenced by display_overlay_state(), and display_toggle_overlay().
| Creature* game::displaying_visibility_creature |
Creature for which to display the visibility map.
Definition at line 1131 of file game.h.
Referenced by display_visibility().
|
private |
Definition at line 247 of file game.h.
Referenced by add_draw_callback(), and draw().
| point game::driving_view_offset |
Definition at line 1118 of file game.h.
Referenced by calc_driving_offset(), serialize(), set_driving_view_offset(), and unserialize().
|
private |
| pimpl<faction_manager> game::faction_manager_ptr |
Definition at line 1100 of file game.h.
Referenced by display_faction_epilogues(), do_regular_action(), perhaps_add_random_npc(), serialize_master(), setup(), and unserialize_master().
|
private |
|
private |
Definition at line 1169 of file game.h.
Referenced by add_npc_follower(), death_screen(), disp_NPC_epilogues(), get_follower_list(), remove_npc_follower(), reset_npc_dispositions(), and setup().
| bool game::fullscreen = false |
Definition at line 1136 of file game.h.
Referenced by get_player_input(), load_static_data(), reenter_fullscreen(), temp_exit_fullscreen(), and toggle_fullscreen().
|
private |
Definition at line 1190 of file game.h.
Referenced by death_screen(), gametype(), handle_action(), has_gametype(), load(), and start_game().
|
private |
Definition at line 1087 of file game.h.
Referenced by serialize(), and unserialize().
| std::vector<effect_on_condition_id> game::inactive_global_effect_on_condition_vector |
Definition at line 1094 of file game.h.
Referenced by serialize(), and unserialize().
|
private |
Definition at line 246 of file game.h.
Referenced by draw_ter(), and look_around().
|
private |
Definition at line 1072 of file game.h.
Referenced by game(), get_kill_tracker(), serialize(), setup(), and unserialize().
|
private |
Definition at line 1206 of file game.h.
Referenced by mouse_edge_scrolling().
|
private |
Definition at line 1208 of file game.h.
Referenced by mouse_edge_scrolling_overmap(), and mouse_edge_scrolling_terrain().
|
private |
Definition at line 1207 of file game.h.
Referenced by mouse_edge_scrolling_overmap(), and mouse_edge_scrolling_terrain().
|
private |
Definition at line 1175 of file game.h.
Referenced by autosave(), init_autosave(), quickload(), and quicksave().
|
mutableprivate |
Definition at line 1177 of file game.h.
Referenced by natural_light_level(), and reset_light_level().
|
private |
Definition at line 1162 of file game.h.
Referenced by list_items().
|
private |
Definition at line 1161 of file game.h.
Referenced by list_items().
|
private |
Definition at line 1066 of file game.h.
Referenced by draw_look_around_cursor(), and handle_mouseview().
|
private |
Definition at line 1077 of file game.h.
Referenced by cata_event_dispatch::avatar_moves(), butcher(), can_move_furniture(), catch_a_monster(), check_near_zone(), check_zone(), climb_down_menu_gen(), climb_down_using(), control_vehicle(), disp_NPCs(), do_regular_action(), draw(), draw_bullet(), draw_critter(), draw_hit_mon(), draw_look_around_cursor(), draw_minimap(), draw_ter(), examine(), extended_description(), find_nearby_items(), fling_creature(), forced_door_closing(), get_cur_om(), get_dangerous_tile(), get_fishable_locations(), get_player_input(), get_veh_dir_indicator_location(), grabbed_furn_move(), grabbed_furn_move_time(), grabbed_veh_move(), is_empty(), is_game_over(), is_sheltered(), knockback(), list_monsters(), load(), load_map(), load_npcs(), look_around(), mon_info_update(), moving_vehicle_dismount(), peek(), phasing_move(), pickup(), place_critter_around(), place_player(), place_player_overmap(), place_vehicle_nearby(), points_in_range(), pre_print_all_tile_info(), print_all_tile_info(), print_fields_info(), print_furniture_info(), print_graffiti_info(), print_items_info(), print_part_con_info(), print_terrain_info(), print_trap_info(), prompt_dangerous_tile(), random_point(), remoteveh(), save_cyborg(), save_maps(), serialize(), setup(), shift_monsters(), slip_down(), start_game(), start_hauling(), swap_critters(), try_get_right_click_action(), update_map(), use_computer(), validate_camps(), validate_linked_vehicles(), validate_mounted_npcs(), vertical_move(), vertical_notes(), vertical_shift(), walk_move(), wield(), and zones_manager().
|
private |
Definition at line 1212 of file game.h.
Referenced by create_or_get_main_ui_adaptor(), invalidate_main_ui_adaptor(), and mark_main_ui_adaptor_resize().
|
private |
Definition at line 1073 of file game.h.
Referenced by game(), and memorial().
| int game::mostseen = 0 |
Definition at line 1152 of file game.h.
Referenced by do_regular_action(), load(), mon_info_update(), place_player(), serialize(), start_game(), and unserialize().
|
private |
Definition at line 1174 of file game.h.
Referenced by get_moves_since_last_save(), init_autosave(), quickload(), and quicksave().
| bool game::new_game = false |
True if the game has just started or loaded, else false.
Definition at line 1105 of file game.h.
Referenced by setup(), and start_game().
|
private |
Definition at line 1167 of file game.h.
Referenced by assign_mission_id(), serialize_master(), setup(), and unserialize_master().
|
private |
Definition at line 1166 of file game.h.
Referenced by assign_npc_id(), serialize_master(), setup(), and unserialize_master().
|
private |
Has a NPC been spawned since last load?
Definition at line 1182 of file game.h.
Referenced by load_npcs(), and set_npcs_dirty().
|
private |
Definition at line 1197 of file game.h.
Referenced by zoom_in_overmap(), and zoom_out_overmap().
| queued_eocs game::queued_global_effect_on_conditions |
Definition at line 1095 of file game.h.
Referenced by serialize(), and unserialize().
|
private |
Definition at line 1180 of file game.h.
Referenced by remoteveh(), setremoteveh(), and setup().
|
private |
Definition at line 1179 of file game.h.
Referenced by remoteveh(), setremoteveh(), and setup().
| safe_mode_type game::safe_mode |
Definition at line 1140 of file game.h.
Referenced by check_safe_mode_allowed(), do_regular_action(), load(), mon_info_update(), serialize(), set_safe_mode(), start_game(), and unserialize().
|
private |
Definition at line 1164 of file game.h.
Referenced by check_safe_mode_allowed(), do_regular_action(), and set_safe_mode().
|
private |
Definition at line 1081 of file game.h.
Referenced by start_calendar(), and start_game().
|
private |
Definition at line 1079 of file game.h.
Referenced by display_scent(), serialize(), setup(), unserialize(), update_map(), and vertical_shift().
|
private |
Seed for all the random numbers that should have consistent randomness (weather).
Definition at line 1200 of file game.h.
Referenced by get_seed(), serialize_master(), start_game(), and unserialize_master().
|
private |
Definition at line 1160 of file game.h.
Referenced by list_items(), and reset_item_list_state().
| bool game::show_panel_adm = false |
Definition at line 1135 of file game.h.
Referenced by draw_panels(), and load_static_data().
|
private |
Definition at line 1074 of file game.h.
Referenced by game(), and spell_events_subscriber().
|
private |
Definition at line 1070 of file game.h.
Referenced by game(), serialize(), stats(), and unserialize().
| tripoint game::ter_view_p |
Definition at line 1107 of file game.h.
Referenced by draw(), draw_ter(), handle_action(), handle_mouseview(), and look_around().
|
private |
How far the tileset should be zoomed out, 16 is default.
32 is zoomed in by x2, 8 is zoomed out by x0.5
Definition at line 1196 of file game.h.
Referenced by get_zoom(), look_around(), mouse_edge_scrolling_terrain(), reset_zoom(), set_zoom(), zoom_in(), and zoom_out().
|
private |
Definition at line 1173 of file game.h.
Referenced by load(), save(), and start_game().
|
private |
Definition at line 1171 of file game.h.
Referenced by load(), save(), and start_game().
|
private |
|
private |
Definition at line 1084 of file game.h.
Referenced by natural_light_level(), and setup().
| time_duration game::turnssincelastmon = 0_turns |
Definition at line 1144 of file game.h.
Referenced by do_regular_action(), mon_info_update(), serialize(), setup(), and unserialize().
|
private |
Definition at line 1078 of file game.h.
Referenced by add_npc_follower(), cata_event_dispatch::avatar_moves(), bury_screen(), butcher(), calc_driving_offset(), can_move_furniture(), cancel_activity_or_ignore_query(), cancel_activity_query(), catch_a_monster(), centerlistview(), chat(), check_safe_mode_allowed(), control_vehicle(), create_starting_npcs(), critter_by_id(), death_screen(), disable_robot(), disp_NPCs(), display_scent(), do_regular_action(), draw(), draw_async_anim_curses(), draw_blink_curses(), draw_critter(), draw_hit_mon(), draw_line(), draw_look_around_cursor(), draw_minimap(), draw_panels(), draw_ter(), draw_trail_to_square(), draw_veh_dir_indicator(), drop_in_direction(), exam_appliance(), exam_vehicle(), examine(), extended_description(), favorite_ammo_or_select(), find_nearby_items(), find_or_make_stairs(), fling_creature(), forced_door_closing(), get_dangerous_tile(), get_player_input(), get_veh_dir_indicator_location(), grabbed_furn_move(), grabbed_furn_move_time(), grabbed_move(), grabbed_veh_move(), insert_item(), inv_map_splice(), inventory_item_menu(), is_game_over(), is_hostile_within(), is_in_dangerous_field(), is_in_viewport(), item_action_menu(), knockback(), list_items(), list_items_monsters(), list_monsters(), load(), look_around(), mon_info_update(), move_save_to_graveyard(), moving_vehicle_dismount(), npc_menu(), on_move_effects(), open_gate(), peek(), perhaps_add_random_npc(), phasing_move(), pickup(), pickup_all(), place_player(), place_player_overmap(), portal_storm_query(), print_all_tile_info(), print_creature_info(), print_items_info(), print_terrain_info(), print_trap_info(), prompt_dangerous_tile(), quickload(), reload(), reload_item(), reload_weapon(), reload_wielded(), remoteveh(), remove_npc_follower(), save(), save_achievements(), save_player_data(), serialize(), set_driving_view_offset(), setremoteveh(), setup(), shared_from(), slip_down(), slip_down_chance(), start_game(), start_hauling(), try_get_left_click_action(), try_get_right_click_action(), unload_container(), unserialize(), update_map(), update_overmap_seen(), use_computer(), validate_camps(), validate_npc_followers(), vertical_move(), vertical_notes(), vertical_shift(), walk_move(), wield(), write_memorial_file(), and zones_manager().
|
private |
Definition at line 1154 of file game.h.
Referenced by shared_from().
|
private |
Definition at line 1088 of file game.h.
Referenced by get_unique_npc_location(), serialize(), setup(), unique_npc_despawn(), unique_npc_exists(), unserialize(), and update_unique_npc_location().
| quit_status game::uquit |
Used in main.cpp to determine what type of quit is being performed.
Definition at line 1103 of file game.h.
Referenced by bury_screen(), do_regular_action(), get_player_input(), handle_action(), is_game_over(), quickload(), and setup().
|
private |
Definition at line 1193 of file game.h.
Referenced by get_user_action_counter(), and handle_action().
| catacurses::window game::w_minimap |
Definition at line 1111 of file game.h.
Referenced by create_or_get_main_ui_adaptor(), and draw_minimap().
|
private |
Definition at line 1157 of file game.h.
Referenced by create_or_get_main_ui_adaptor().
| catacurses::window game::w_omlegend |
| catacurses::window game::w_overmap |
| catacurses::window game::w_pixel_minimap |
Definition at line 1112 of file game.h.
Referenced by create_or_get_main_ui_adaptor(), draw_pixel_minimap(), look_around(), and toggle_pixel_minimap().
| catacurses::window game::w_terrain |
Definition at line 1108 of file game.h.
Referenced by calc_driving_offset(), create_or_get_main_ui_adaptor(), display_scent(), draw(), draw_async_anim_curses(), draw_blink_curses(), draw_critter(), draw_cursor(), draw_look_around_cursor(), draw_ter(), draw_veh_dir_indicator(), draw_weather(), draw_zones(), get_player_input(), handle_action(), handle_mouseview(), is_in_viewport(), look_around(), and pickup().
|
private |
Definition at line 1156 of file game.h.
Referenced by create_or_get_main_ui_adaptor().
|
private |
| bool game::was_fullscreen = false |
Definition at line 1137 of file game.h.
Referenced by load_static_data(), reenter_fullscreen(), and temp_exit_fullscreen().
|
private |
Definition at line 1146 of file game.h.
Referenced by get_player_input(), place_player_overmap(), setup(), and start_game().
|
private |
Is Zone manager open or not - changes graphics of some zone tiles.
Definition at line 1188 of file game.h.
Referenced by is_zones_manager_open(), and zones_manager().